{{ message }}
WIP: Add Button component to shared package#36191
Draft
hmhealey wants to merge 31 commits intohh_shared-package-2from
Draft
WIP: Add Button component to shared package#36191hmhealey wants to merge 31 commits intohh_shared-package-2from
hmhealey wants to merge 31 commits intohh_shared-package-2from
Conversation
This is everywhere that I could just replace `<button className='btn btn-primary'>` with `<Button emphasis='primary'>` (and some other emphasis versions) without any additional changes. There's still more places where this could be used which require more in-depth changes that will be in a following commit.
This is a minor functional change because these elements are now accessible.
This is removing some usage of a save-button CSS that doesn't seem to affect these components.
There's a small functional change here because the copy button in the header of the FullLogEventModal is now styled when it wasn't before.
… btn-danger This removes some CSS classes from some different elements, but as elsewhere, those CSS classes don't actually do anything. I think some might have had a purpose once, but there seems to be quite a few that were copied around during previous, possibly AI-assisted refactors.
Everything that used that prop either passed the tertiary class that was the default or passed a class that didn't exist.
These still need inverted button support, but I took the opportunity to clean up some convoluted code to determine what styling they otherwise receive.
All of these are anchors with click handlers and the btn class, so they'd appear as buttons anyway.
This includes some minor functional changes due to moving these components to standardized CSS classes. The styles mostly matched a secondary button except for slightly different padding and colours. I also removed a workaround for an old issue with OverlayTrigger and disabled buttons in favour of just using the disabled attribute. For more information on the previous code, see mattermost/mattermost-webapp#10387. Based on some brief testing, that's no longer needed.
It duplicates btn-danger with a slightly different colour in some cases
The places we passed btn-primary previously were redundant
This prop is currently used, but as far as I can tell, those CSS classes don't have any styles applied.
4c3b01d to
bb4bae9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Ticket Link
Screenshots
Release Note