-
Notifications
You must be signed in to change notification settings - Fork 8
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
Review of recent changes #41
Comments
I'd like to release these features this week, so if anybody wants to take a look, now's the time. |
I had a look through the code + test cases app. I like the direction! Here's some specific feedback:
|
Thanks for the notes, @samanpwbb. You're right that form components have not been changed. I figure that can come later. I like your points — I think we might need a little more discussion to decide how to act on them.
This is our current pattern. I'd be happy to change this if we have another button style that we want to rally around as the default. This is also something we could change later.
Yeah, it is a weird one. However, I don't think there is any semantic distinction between dark & light; and it's not quite like the other
Sure. Maybe just
No, that wasn't the intent. My thinking was that those size words would always be relative to the component itself. In fact, within Any of those responses trigger an idea? |
Right now button heights are:
Yeah, makes sense. I still find it a little weird that one component has either
In Studio at least, we use dark popovers for contextual information, when we want content to have some separation from the rest of the app, and we use white popovers for content that should feel like part of the UI. Of course, the reverse would be true if an app is predominantly dark. I would be in favor of: all our UIs should be predominantly light, and dark popovers should be reserved for reference info / onboarding / ect. So, the variants would be |
Interesting idea about the size-variant naming scheme. My one reservation is that I can imagine cases where we'd know we have, say, only one option at the moment and the relevant size is clearly not "large", and if we were to add more sizes in the future they would be larger than the current one. Then we'd have to make a breaking change where what used to be called "large" is now called "small" or "medium". So I was trying to base the word choice on guesses about where we might want room to add more options in the future. How do you think that concern weighs in?
In Studio are all tooltips are dark popovers, and all dark popovers tooltips? Are there any cases where you'd use a light tooltip? Your description of the semantics sounds like what tooltips. I'd be fine with dark being the the background for every tooltip — but we'd still need to expose it on the Popover itself, and PopoverTrigger. I guess we could have a |
I don't know what to do about the popover coloring 🤷♂️ @angel could you give us some insight into whether you think Account or Admin or other apps should/will be following Studio's pattern here? I still can't think of any prop name more direct and meaningful than |
@davidtheclark in accounts we use this light tool tip, but no other popovers: I don't really see this as a pattern that accounts will be using. I see us using more tooltips without buttons. |
Thats fine for now – eventually I do believe it will be in our benefit to move towards style variants with semantic meaning. |
I'd love it if @samanpwbb and @mapbox/frontend-platform (and anybody else in @mapbox/frontend who is interested) could take a look at the
HEAD
section in the changelog and share any feedback you have about the new patterns. It would probably be helpful to look at the changelog then run the docs locally and check things out.There's a little bit of general clean up, but most of the changes relate to more opinionated styling and more controlled style-modifying props. Most components that are not form components have been updated according to this plan. (Form components can come later.)
Here's a run-down of the patterns:
variant
prop can be used for keyword-based presets. In Button, the chosenvariant
ends up setting props that you can then override if you want to set those props directly.color
props expect an Assembly color name."small" | "medium" | "large"
).block
,overlapBorder
).passthroughProps
is a convention for passing props directly to a DOM element.className
prop for fully overriding the element's classes. If necessary, we could add a similar nuclear-option override to other components; but CopyButton seems like an exception because we have almost no consistency across our usage of it.See the specific props related to the above patterns
Button:
Copiable:
CopyButton:
Heading:
IconText:
Modal:
Popover
PopoverTrigger
Tooltip
UnderlineTabs
Once we have consensus about these changes, we'll need to do some cross-browser testing, then we can release. There is no huge hurry on this; but it'd be a good idea to finish up these changes within the next few weeks so the repo doesn't stagnate and we're unable to release bug fixes.
The text was updated successfully, but these errors were encountered: