Skip to content

lib/ui utility classes#1147

Merged
RobbieTheWagner merged 9 commits intoemberjs:masterfrom
nummi:lib-ui-utility-classes
Mar 9, 2020
Merged

lib/ui utility classes#1147
RobbieTheWagner merged 9 commits intoemberjs:masterfrom
nummi:lib-ui-utility-classes

Conversation

@nummi
Copy link
Copy Markdown
Contributor

@nummi nummi commented Feb 21, 2020

Moving more components to utility classes to help with the amount of CSS we maintain and help with possible move to Tailwind. Most utility classes added follow Tailwind CSS naming — there are unique classes marked at the bottom of utils.scss.

The easiest way to review is probably going through each commit one at a time.

@nummi nummi force-pushed the lib-ui-utility-classes branch from 8af82bc to 974fa28 Compare February 21, 2020 21:53
Copy link
Copy Markdown
Member

@RobbieTheWagner RobbieTheWagner left a comment

Choose a reason for hiding this comment

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

Looks mostly good! Just a few suggestions / comments.

Comment thread app/styles/utils.scss

.text-inherit { color: var(--inherit); }

.bg-base00 { background-color: var(--base00); }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tailwind supports setting your own colors to be used for both background-color and text color, so these could actually be part of tailwind.

Comment thread app/styles/utils.scss
.text-base11 { color: var(--base11); }
.text-base13 { color: var(--base13); }

.text-12 { font-size: 12px; }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure how many text sizes we have, but maybe we should try to standardize on text-xs text-sm etc to align with tailwind?

Copy link
Copy Markdown
Contributor Author

@nummi nummi Feb 22, 2020

Choose a reason for hiding this comment

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

I've been thinking about this. Since we have an app the spectrum of font sizes goes something like: font-size: 10px – 15px. Not sure it makes sense to have names like this:

text-xs: 10px
text-sm: 11px
text-base: 12px
text-lg: 13px
text-xl: 14px

We don't need our fonts to range this size:

image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think your suggestion sounds fine:

text-xs: 10px
text-sm: 11px
text-base: 12px
text-lg: 13px
text-xl: 14px

It is a little bit odd to have them all 1px different though. I think I would advocate more for setting a base font size and making all these rem based like tailwind does.

Comment thread lib/ui/addon/components/disclosure-triangle.hbs
Comment thread lib/ui/addon/components/toolbar-search-field.hbs Outdated
Copy link
Copy Markdown
Member

@RobbieTheWagner RobbieTheWagner left a comment

Choose a reason for hiding this comment

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

LGTM! Mind running yarn to get things updated?

@nummi nummi force-pushed the lib-ui-utility-classes branch from f14289d to c2a7979 Compare February 26, 2020 18:09
nummi added 9 commits March 9, 2020 10:17
- Move to lib/ui
- Utility classes
- utility classes
- Use ember-test-selectors across entire app
- Upgrade ember-test-selectors
@nummi nummi force-pushed the lib-ui-utility-classes branch from c2a7979 to a66c302 Compare March 9, 2020 17:17
@RobbieTheWagner RobbieTheWagner merged commit 74916ba into emberjs:master Mar 9, 2020
nummi added a commit to nummi/ember-inspector that referenced this pull request Apr 1, 2020
* Cleanup warning message component

- Move to lib/ui
- Utility classes

* Cleanup error page component

- utility classes

* Cleanup disclosure triangle component

- utility classes

* Cleanup drag handle component

- utility classes

* Cleanup empty message component

- utility classes

* Cleanup toolbar divider component

- utility classes

* Cleanup toolbar search field component

- utility classes

* Misc nav and pill css cleanup

* Use ember-test-selectors

- Use ember-test-selectors across entire app
- Upgrade ember-test-selectors
nummi added a commit to nummi/ember-inspector that referenced this pull request Apr 5, 2020
* Cleanup warning message component

- Move to lib/ui
- Utility classes

* Cleanup error page component

- utility classes

* Cleanup disclosure triangle component

- utility classes

* Cleanup drag handle component

- utility classes

* Cleanup empty message component

- utility classes

* Cleanup toolbar divider component

- utility classes

* Cleanup toolbar search field component

- utility classes

* Misc nav and pill css cleanup

* Use ember-test-selectors

- Use ember-test-selectors across entire app
- Upgrade ember-test-selectors
patricklx pushed a commit to patricklx/ember-inspector that referenced this pull request Sep 19, 2022
* Cleanup warning message component

- Move to lib/ui
- Utility classes

* Cleanup error page component

- utility classes

* Cleanup disclosure triangle component

- utility classes

* Cleanup drag handle component

- utility classes

* Cleanup empty message component

- utility classes

* Cleanup toolbar divider component

- utility classes

* Cleanup toolbar search field component

- utility classes

* Misc nav and pill css cleanup

* Use ember-test-selectors

- Use ember-test-selectors across entire app
- Upgrade ember-test-selectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants