WIP: Add Button component to shared package by hmhealey · Pull Request #36191 · mattermost/mattermost · GitHub
Skip to content

WIP: Add Button component to shared package#36191

Draft
hmhealey wants to merge 31 commits intohh_shared-package-2from
hh_shared-package-button
Draft

WIP: Add Button component to shared package#36191
hmhealey wants to merge 31 commits intohh_shared-package-2from
hh_shared-package-button

Conversation

@hmhealey
Copy link
Copy Markdown
Member

Summary

Ticket Link

Screenshots

Release Note


@mm-cloud-bot mm-cloud-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Apr 21, 2026
hmhealey added 29 commits April 22, 2026 09:42
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.
@hmhealey hmhealey force-pushed the hh_shared-package-button branch from 4c3b01d to bb4bae9 Compare April 22, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants