Skip to content

fix(#2722): docs update - input prop textalign#383

Merged
twjeffery merged 1 commit into
alphafrom
Syed/2793-docs
Jun 16, 2025
Merged

fix(#2722): docs update - input prop textalign#383
twjeffery merged 1 commit into
alphafrom
Syed/2793-docs

Conversation

@syedszeeshan
Copy link
Copy Markdown
Collaborator

@syedszeeshan syedszeeshan commented Jun 11, 2025

Task: GovAlta/ui-components#2793
Story: GovAlta/ui-components#2722

Updated Video (after changes suggested by Thomas)

Task2793-For-Story-2722-Docs-Examples-Updated.mp4

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 11, 2025

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

Name Link
🔨 Latest commit c003ddc
🔍 Latest deploy log https://app.netlify.com/projects/abgov-ui-component-docs/deploys/684ca71684d9e300086cadb1
😎 Deploy Preview https://deploy-preview-383--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 syedszeeshan changed the title NOT READY - Syed/2793 docs NOT READY - fix(#2722): docs update - textalign - input Jun 11, 2025
@syedszeeshan syedszeeshan changed the title NOT READY - fix(#2722): docs update - textalign - input NOT READY - fix(#2722): docs update - input prop textalign Jun 11, 2025
@syedszeeshan syedszeeshan changed the title NOT READY - fix(#2722): docs update - input prop textalign fix(#2722): docs update - input prop textalign Jun 11, 2025
@syedszeeshan syedszeeshan marked this pull request as ready for review June 11, 2025 18:57
@syedszeeshan syedszeeshan marked this pull request as draft June 11, 2025 19:01
@syedszeeshan syedszeeshan marked this pull request as ready for review June 11, 2025 19:27
Comment thread src/routes/components/TextField.tsx Outdated
Comment thread src/routes/components/TextField.tsx Outdated
Comment thread src/routes/components/TextField.tsx Outdated
Comment thread src/routes/components/TextField.tsx Outdated
@@ -733,8 +797,7 @@ export default function TextFieldPage() {
Examples
<GoabBadge type="information" content="5" />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

content should be 6 now

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

PR updated, WIP.

Comment thread src/examples/text-field/TextFieldRightAlignExample.tsx Outdated

const noop = () => {};
return (
<Sandbox flags={["reactive"]} skipRenderOnly={"react"}>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see duplicated code snippet for new angular
image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

PR will be updated shortly.


const noop = () => {};
return (
<Sandbox flags={["reactive"]} skipRenderOnly={"react"}>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see no code snippet for new React
image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

PR will be updated shortly

@syedszeeshan syedszeeshan force-pushed the Syed/2793-docs branch 2 times, most recently from aa66348 to 5e3b688 Compare June 13, 2025 16:07
@ArakTaiRoth ArakTaiRoth linked an issue Jun 13, 2025 that may be closed by this pull request
@twjeffery twjeffery self-requested a review June 13, 2025 17:09
Copy link
Copy Markdown
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

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

Hi @syedszeeshan, a few content and formatting changes needed to the example. Should be just properties to update, let me know if you have any questions:

  • Full name: align Full Name to the left and remove helper text. We would not align full name like this to the right, so it's a bit confusing. Showing a left aligned input in the field set is useful as well to show the different variations. Also, change the width of the full name input to 100%.
  • Account number: change account number field to use normal input type (default). We would not add an account number as a type number for the user as it can be hard to enter in large numbers. Keep the field right aligned. Change helper text to: "This input is right aligned."
  • Price: add trailing content: "per item". Set width to 7ch. Change helper text to: "The input number component is right aligned by default."
  • Quantity: change helper text to: "You can set a number input to be left aligned."
  • Change gap between fields to XL

@syedszeeshan syedszeeshan force-pushed the Syed/2793-docs branch 2 times, most recently from a366747 to 6fc64ee Compare June 13, 2025 20:21
@syedszeeshan
Copy link
Copy Markdown
Collaborator Author

@twjeffery @vanessatran-ddi @ArakTaiRoth
I have made the changes as requested, I have also updated all the code snippets to reflect the same behavior.

Video also updated for reference.

Ready for testing.

@twjeffery twjeffery self-requested a review June 13, 2025 21:00
@vanessatran-ddi
Copy link
Copy Markdown
Collaborator

vanessatran-ddi commented Jun 13, 2025

QA:

Angular lts code, I run it and the price input isn't shown. (event based example)
image
Stackblitz link: https://stackblitz.com/~/github.com/vanessatran-ddi/ui-components-angular-sandbox/tree/doc-383-lts?file=src/app/app.component.html
Same with reactive form code snippet angular lts. it doesn't work.

@vanessatran-ddi
Copy link
Copy Markdown
Collaborator

QA React
New React code snippet:
image

The price and quantity has 0 as initial value while the sandbox of the document doesn't.
image

The same happens with lts React code.

@syedszeeshan syedszeeshan force-pushed the Syed/2793-docs branch 2 times, most recently from 4b7d321 to 0132437 Compare June 13, 2025 22:04
@syedszeeshan
Copy link
Copy Markdown
Collaborator Author

QA React New React code snippet: image

The price and quantity has 0 as initial value while the sandbox of the document doesn't. image

The same happens with lts React code.

I have removed the initial value of 0. PR will be updated shortly.

@syedszeeshan
Copy link
Copy Markdown
Collaborator Author

QA:

Angular lts code, I run it and the price input isn't shown. (event based example) image Stackblitz link: https://stackblitz.com/~/github.com/vanessatran-ddi/ui-components-angular-sandbox/tree/doc-383-lts?file=src/app/app.component.html Same with reactive form code snippet angular lts. it doesn't work.

Since we dont have angular wrappers in LTS, I have removed the last 2 (i.e. Price and Quantity) from the examples and from the code snippet when the Angular and LTS is selected. PR will be updated shortly.

@syedszeeshan
Copy link
Copy Markdown
Collaborator Author

syedszeeshan commented Jun 13, 2025

@twjeffery @ArakTaiRoth
The goab-input-number works for Angular/current.... but not for LTS (there is no Angular wrapper). Therefore, I have made a small change, when Angular and LTS version is selected, then the last 2 examples i.e. Price and Quantity will not be shown.

However, in this case, if you want me to show a different example e.g. using <goa-input type="number" then please let me know....alongwith the text for 'helper text'.

@twjeffery twjeffery merged commit b31073a into alpha Jun 16, 2025
7 checks passed
@twjeffery twjeffery deleted the Syed/2793-docs branch June 16, 2025 17:05
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.

Documentation for goa-input text-align prop

3 participants