Skip to content

Conversation

@zamoore
Copy link
Contributor

@zamoore zamoore commented Sep 18, 2025

📌 Summary

If merged, this PR removed a style rule that center-aligns the ApplicationState component.

🛠️ Detailed description

The current implementation of the ApplicationState component has a margin: 0 auto; rule on the root element (.hds-application-state). This forces a center alignment of the component, which consumers need to override.

In order to make adoption of this change as smooth as possible, we have added a new @isAutoCentered attribute to the root level ApplicationState component. This argument defaults to true and applies the margin: 0 auto; style rule via the hds-application-state--is-auto-centered class. This behavior can be disabled by setting @isAutoCentered to false.

🔗 External links

Jira ticket: HDS-3584


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

📋 PCI review checklist
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've worked with GRC to document the impact of any changes to security controls.
    Examples of changes to controls include access controls, encryption, logging, etc.
  • If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.
    Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.

@vercel
Copy link

vercel bot commented Sep 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
hds-showcase Ready Ready Preview Oct 6, 2025 2:24pm
hds-website Ready Ready Preview Oct 6, 2025 2:24pm

Copy link
Contributor

@didoo didoo left a comment

Choose a reason for hiding this comment

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

Now that we have removed the self-alignment, probably we should update the showcase to have two variants (default + center-aligned) for some of the cases (eg. when it's in a container) because I think in most of the cases, the empty state will be visually centered (in a page, or in a table, or in a card). As far as I remember, the request came from Atlas/TFC and was an exception.

Which leads me to this consideration: what if introducing this change as is now (which is definitely breaking, will impact a lot of places, and can't be codemoded but will require a lot of manual checks) we define a new argument - @hasMarginAuto or @autoCenter or or something similar - that by default is true (so non-breaking) but that consumers can turn off if/when needed?

@zamoore
Copy link
Contributor Author

zamoore commented Sep 19, 2025

Now that we have removed the self-alignment, probably we should update the showcase to have two variants (default + center-aligned) for some of the cases (eg. when it's in a container) because I think in most of the cases, the empty state will be visually centered (in a page, or in a table, or in a card). As far as I remember, the request came from Atlas/TFC and was an exception.

Which leads me to this consideration: what if introducing this change as is now (which is definitely breaking, will impact a lot of places, and can't be codemoded but will require a lot of manual checks) we define a new argument - @hasMarginAuto or @autoCenter or or something similar - that by default is true (so non-breaking) but that consumers can turn off if/when needed?

I really like the idea of introducing a new property. autoCenter sounds good to me. This is similar to what we did for isInline in the icon component, so it has precedent.

@zamoore zamoore force-pushed the main-5.0.0 branch 2 times, most recently from 42e1aaa to 468a8bc Compare September 22, 2025 21:19
@zamoore zamoore force-pushed the zamoore/hds-3584-update-ApplicationState-layout branch from 852efe0 to e904f7d Compare September 22, 2025 21:31
@zamoore zamoore force-pushed the zamoore/hds-3584-update-ApplicationState-layout branch from c4598aa to 6f12879 Compare October 6, 2025 14:20
@zamoore zamoore merged commit 3316e6e into main-5.0.0 Oct 6, 2025
4 of 6 checks passed
@zamoore zamoore deleted the zamoore/hds-3584-update-ApplicationState-layout branch October 6, 2025 14:20
@zamoore zamoore mentioned this pull request Oct 6, 2025
5 tasks
zamoore added a commit that referenced this pull request Oct 7, 2025
zamoore added a commit that referenced this pull request Oct 7, 2025
zamoore added a commit that referenced this pull request Oct 8, 2025
zamoore added a commit that referenced this pull request Oct 9, 2025
zamoore added a commit that referenced this pull request Oct 10, 2025
zamoore added a commit that referenced this pull request Oct 10, 2025
zamoore added a commit that referenced this pull request Oct 13, 2025
zamoore added a commit that referenced this pull request Oct 14, 2025
zamoore added a commit that referenced this pull request Oct 27, 2025
zamoore added a commit that referenced this pull request Oct 27, 2025
zamoore added a commit that referenced this pull request Oct 28, 2025
zamoore added a commit that referenced this pull request Oct 31, 2025
zamoore added a commit that referenced this pull request Nov 3, 2025
aklkv pushed a commit that referenced this pull request Nov 4, 2025
zamoore added a commit that referenced this pull request Nov 4, 2025
zamoore added a commit that referenced this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-website Content updates to the documentation website packages/components showcase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants