-
Notifications
You must be signed in to change notification settings - Fork 37
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
UI v2 coding guidelines #3626
Comments
Added Point 12. |
@louischan is this documented? can I close it? |
Let me close this. We can refer to this issue when we need it in the future. |
We should move the agreed content to |
louischan-oursky
changed the title
Authflow V2 coding guidelines
UI v2 coding guidelines
Aug 29, 2024
This was referenced Oct 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have 2 levels of theming.
base.css
.--navbar__title-font-family
is the second level.--typography-title-large__font-family
is the first level.We borrow BEM naming convention to name the CSS variables.
navbar.css
, so the component name isnavbar
.--navbar_
.--navbar__some-meaningful-css-property
--navbar__some-meaningful-css-property--variant
Prefer
tablet:
over@media
HTML semantics is important.
Use
gap
for spacing.See #3613 (comment)
Use
ltr:
andrtl:
when you use explicit left/right.See #4662 (comment)
Verbs
create
,delete
,change
,view
add
,remove
,change
,view
Always think about when the case when javascript is disabled
panic with error
Instead of
panic("some string")
,panic(fmt.Errorf("some string"))
. The rationale is that when you are the person whorecover()
, you want to get anerror
instead of astring
. You can further callerrors.As
anderrors.Is
or any other errors processing functions on the recovered error.The text was updated successfully, but these errors were encountered: