-
Notifications
You must be signed in to change notification settings - Fork 50
ApplicationState
- Remove center alignment rule
#3205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ApplicationState
- Remove center alignment rule
#3205
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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?
I really like the idea of introducing a new property. |
7c0bc36
to
81a4cea
Compare
1f56786
to
9c1aec5
Compare
42e1aaa
to
468a8bc
Compare
852efe0
to
e904f7d
Compare
2dad884
to
f52efb1
Compare
38abdce
to
451a3bb
Compare
451a3bb
to
c4598aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, but there is a test on the website that is failing.
Co-authored-by: Cristiano Rastelli <cristiano.rastelli@hashicorp.com>
c4598aa
to
6f12879
Compare
๐ 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 amargin: 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 levelApplicationState
component. This argument defaults totrue
and applies themargin: 0 auto;
style rule via thehds-application-state--is-auto-centered
class. This behavior can be disabled by setting@isAutoCentered
tofalse
.๐ External links
Jira ticket: HDS-3584
๐ Component checklist
๐ฌ Please consider using conventional comments when reviewing this PR.
๐ PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.