Skip to content

fix(#2867): docs autocomplete prop for input, textarea, dropdown#394

Merged
twjeffery merged 1 commit into
alphafrom
Syed/docs-2867-autocomplete
Jul 15, 2025
Merged

fix(#2867): docs autocomplete prop for input, textarea, dropdown#394
twjeffery merged 1 commit into
alphafrom
Syed/docs-2867-autocomplete

Conversation

@syedszeeshan
Copy link
Copy Markdown
Collaborator

@syedszeeshan syedszeeshan commented Jul 10, 2025

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 10, 2025

Deploy Preview for abgov-ui-component-docs ready!

Name Link
🔨 Latest commit 15ec7fb
🔍 Latest deploy log https://app.netlify.com/projects/abgov-ui-component-docs/deploys/687146f3bb57430008dac183
😎 Deploy Preview https://deploy-preview-394--abgov-ui-component-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@syedszeeshan
Copy link
Copy Markdown
Collaborator Author

image

@twjeffery
I added a badge prop to the ComponentProperties page to accept custom text and the badge type for color.
Currently, we do this for "Required" prop only, as a yellow badge, so this is something new I added. If you dont like it then I will remove this.

@syedszeeshan syedszeeshan requested a review from twjeffery July 10, 2025 18:03
@syedszeeshan syedszeeshan marked this pull request as ready for review July 10, 2025 18:12
@bdfranck
Copy link
Copy Markdown
Collaborator

bdfranck commented Jul 11, 2025

@syedszeeshan That's an interesting approach! Thanks for exploring that.

I noticed that we just call out the non-native only properies in the description. Can you think of a benefit for the badge instead of just using the description like the below screenshot?

image

The custom badge is a good idea if we have the need for adding more in the future. Is there a need for other types of badges in the properties?

@vanessatran-ddi
Copy link
Copy Markdown
Collaborator

QA feedback (11 July, 2025):

  • the attribute autoComplete is not on LTS at least for React (remove from Input, Dropdown and Textarea for LTS version)

https://github.com/GovAlta/ui-components/blob/lts/libs/react-components/src/lib/input/input.tsx#L73

image

@syedszeeshan syedszeeshan force-pushed the Syed/docs-2867-autocomplete branch from b1d1995 to 55106e7 Compare July 11, 2025 16:59
@syedszeeshan
Copy link
Copy Markdown
Collaborator Author

syedszeeshan commented Jul 11, 2025

@syedszeeshan That's an interesting approach! Thanks for exploring that.

I noticed that we just call out the non-native only properies in the description. Can you think of a benefit for the badge instead of just using the description like the below screenshot?

image The custom badge is a good idea if we have the need for adding more in the future. Is there a need for other types of badges in the properties?

I was just trying to be creative.

I have updated the PR:
-the underlying text is changed to "Specifies the autocomplete attribute for the dropdown input. Native only." for dropdown.
-the LTS version will not show the autoComplete prop
-the badge functionality is still there..ComponentProperties.tsx has an optional badge prop... it's just not used for the dropdown. which means the grey badge "native only" is not going to show up anymore. But we do still have this available, for future use.

The reason I thought of making it a badge is b/c it stands out, just like the Required badge...except that this badge prop (unlike Required flag) will accept any custom text and also allows different colors (when we choose the badge type).

If there are any other changes required, please let me know.
@bdfranck @twjeffery @vanessatran-ddi

@syedszeeshan syedszeeshan force-pushed the Syed/docs-2867-autocomplete branch from 55106e7 to 15ec7fb Compare July 11, 2025 17:16
Copy link
Copy Markdown
Collaborator

@bdfranck bdfranck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@syedszeeshan Looks good to me! 👍

image image image

@ArakTaiRoth
Copy link
Copy Markdown
Collaborator

@twjeffery This PR is ready to be merged

@twjeffery twjeffery merged commit 0e65670 into alpha Jul 15, 2025
7 checks passed
@twjeffery twjeffery deleted the Syed/docs-2867-autocomplete branch July 15, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autocomplete property needs to be documented

5 participants