Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(button): Simplify Button components and prep for theming #471

Merged
merged 53 commits into from Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f1b6473
refactor: Add initial thoughts on button refactor
anicholls Feb 13, 2020
51344cd
refactor: Avoid duplicating size types
anicholls Feb 14, 2020
9647baa
refactor(button): Refactor to new structure for styles
anicholls Feb 14, 2020
0d00a7d
refactor(button): Add missing growth behavior
anicholls Feb 18, 2020
249be80
fix(button): Fix text button variant
anicholls Feb 18, 2020
b3aef49
refactor(button): Use labs styled function
anicholls Feb 18, 2020
25231a0
refactor(button): Add remainder of package files
anicholls Feb 18, 2020
9f08cd2
refactor(button): Add stories for new button components
anicholls Feb 18, 2020
00e3862
refactor(button): Initial pass at refactoring IconButton
anicholls Feb 19, 2020
336c393
refactor(button): Remove the need for extra span in IconButton
anicholls Feb 19, 2020
fc176f7
refactor(button): Fix text button styling and simplify label styles
anicholls Feb 19, 2020
4a10905
refactor(button): Move spacing logic from parts to ButtonContainer
anicholls Feb 19, 2020
3cb6686
refactor(button): Remove unnecessary/redundant color specs
anicholls Feb 19, 2020
de0de1d
refactor(button): Fix deprecated button colors
anicholls Feb 19, 2020
a0a2981
refactor(button): Add deprecation message to deprecated button
anicholls Feb 19, 2020
59bbf7c
refactor(button): Add callback for icon button onToggleChange
anicholls Feb 19, 2020
263ecff
refactor(button): Account for toggled icon button icon fills
anicholls Feb 20, 2020
587ca4a
refactor(button): Implement configurable focus ring
anicholls Feb 20, 2020
4e1ca61
refactor(button): Add missing growth behavior
anicholls Feb 20, 2020
7acc64f
refactor(button): Remove icon button backgrounds that shouldn't be there
anicholls Feb 20, 2020
52caff7
refactor(button): Remove unnecessary styles
anicholls Feb 20, 2020
1e0c961
refactor(button): Inline default props
anicholls Feb 20, 2020
0f5ddb3
refactor(button): Standardize color object API in preps for theming
anicholls Feb 20, 2020
86ac7ef
Revert "refactor(button): Inline default props"
anicholls Feb 20, 2020
1e4cbe0
fix: Resolve build errors
anicholls Feb 24, 2020
5f69c0a
fix(labs): Add missing dependency
anicholls Feb 24, 2020
3324c66
fix(labs): Use correct ref props
anicholls Feb 24, 2020
2e3d8ef
fix(labs): Only call IconButton::onToggleChange on update
anicholls Feb 24, 2020
a3f8c0d
test(labs): Add testing-library/react tests for new button
anicholls Feb 24, 2020
b669e8c
fix(labs): Resolve storybook console errors
anicholls Feb 24, 2020
47d945b
ci(labs): Enable chromatic snapshots for new buttons
anicholls Feb 24, 2020
bd36758
refactor(button): Change base interface back to ButtonHTMLAttributes
anicholls Feb 25, 2020
fe7e686
chore: Disable no-use-before-define for functions
anicholls Feb 26, 2020
71362f6
refactor(button): Clean up spacing/size usage in ButtonLabelIcon
anicholls Mar 2, 2020
e35aef5
fix(button): Ensure IconButton onToggleChange doesn't become stale
anicholls Mar 2, 2020
22be892
docs(button): Fix typo in TextButton comment
anicholls Mar 3, 2020
0ddf937
refactor(button): Change size enums to string literals
anicholls Mar 4, 2020
a6ebee5
refactor(button): Use new default prop style
anicholls Mar 4, 2020
e2965dd
docs(button): Update readme
anicholls Mar 4, 2020
08c1987
refactor(button): Replace old button module with refactored button
anicholls Mar 4, 2020
5258f92
refactor(button): Re-add old stories
anicholls Mar 5, 2020
462b4cc
fix(button): Fix a few issues with deprecated_Button
anicholls Mar 5, 2020
e468b22
fix(button): Use correct sizes for delete button story
anicholls Mar 5, 2020
dcf01c0
refactor(button): Remove data label support from HighlightButton
anicholls Mar 5, 2020
ded967a
refactor(button): Remove unnecessary fn components from visual testing
anicholls Mar 5, 2020
98d9eac
refactor(button): Convert text button allCaps into a prop
anicholls Mar 5, 2020
d6b9daf
refactor(button): Split outline button variants into their own component
anicholls Mar 5, 2020
1a6df22
refactor(button): Don't show data label or icon at small sizes
anicholls Mar 5, 2020
531955d
refactor(button): Use const instead of enum for ButtonSize
anicholls Mar 5, 2020
5514dac
test(button): Update story in failing cypress test
anicholls Mar 5, 2020
ce33cff
fix(button): Fix button label icon alignment
anicholls Mar 5, 2020
74ac320
fix(modal): Update old delete button references in modal stories
anicholls Mar 5, 2020
592ccf2
fix(pagination): Fix pagination buttons after button refactor
anicholls Mar 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cypress/integration/Button.spec.ts
Expand Up @@ -7,7 +7,7 @@ describe('Button', () => {

context('given primary buttons are rendered', () => {
beforeEach(() => {
h.stories.load('Components|Buttons/Button/React', 'Primary');
h.stories.load('Components|Buttons/Button/React/Standard', 'Primary');
});

it('should not have any axe errors', () => {
Expand Down
2 changes: 1 addition & 1 deletion eslintrc.js
Expand Up @@ -75,7 +75,7 @@ module.exports = {
'no-param-reassign': 'error',
'no-undef-init': 'error',
'no-unused-labels': 'error',
'no-use-before-define': 'warn', // Decide on this
'no-use-before-define': ['warn', {functions: false, classes: true}],
'no-var': 'error',
'prefer-const': 'error',
'quote-props': 'off',
Expand Down
8 changes: 6 additions & 2 deletions modules/_labs/pagination/react/lib/Pages.tsx
Expand Up @@ -19,17 +19,21 @@ const noPointerEvents = css({
pointerEvents: 'none',
});

const autoWidth = css({
width: 'auto',
});

const ellipsisStyle = css(noPointerEvents, {
width: canvas.spacing.l,
textAlign: 'center',
display: 'inline-block',
});

const noTransitions = css({
const noTransitions = css(autoWidth, {
'&:not(:hover)': {transition: 'none !important'},
});

const activeStyling = css(noPointerEvents, noTransitions, {
const activeStyling = css(noPointerEvents, noTransitions, autoWidth, {
color: canvas.colors.frenchVanilla100,
});

Expand Down