-
Notifications
You must be signed in to change notification settings - Fork 13
fix: unify customization flow next step button styling #7789
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
Merged
Ur-imazing
merged 126 commits into
main
from
urimchae/nes-856-unify-styling-of-next-buttons-other-misc-elements-in
Oct 2, 2025
Merged
Changes from all commits
Commits
Show all changes
126 commits
Select commit
Hold shift + click to select a range
06a071d
feat: customize init
Kneesal 8cee2e8
feat: multi step form layout (#7352)
csiyang 7c6217e
Merge branch 'main' into feature/25-00-NC-feat-church-invites
csiyang b56fef0
feat: customize page set up (#7374)
csiyang 448fd5d
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 89d048c
feat: template customize create (#7389)
csiyang af5e58c
feat: create customise fields consume pattern (#7404)
Kneesal ca3f955
fix: retain text outside of variables intact
Kneesal fc29665
fix: syntax of variables we support
Kneesal caacdb7
feat: text screen (#7355)
csiyang b5d5f01
feat: links screen (#7419)
csiyang d25f421
feat: church invite team select screen (#7420)
Kneesal b859848
fix: done screen
Kneesal d07fbe3
feat: action customizable toggle (#7425)
csiyang c56e9ec
fix: handle null social image
Kneesal ae61bb4
Merge branch 'feature/25-00-NC-feat-church-invites' of https://github…
Kneesal 8405192
fix: after user duplicates - dont show input
Kneesal 74dc81e
fix: lint
Kneesal 608d1ad
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 70c0fa7
Merge branch 'feature/25-00-NC-feat-church-invites' of https://github…
Kneesal 545d5e9
fix: script
Kneesal 4a951f8
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 18c334b
fix: lint
Kneesal cc222be
fix: breaking tests
Kneesal 4a97503
fix: journey customize team select tests
Kneesal 7246403
fix: comment out and lint
Kneesal c05ca5d
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 305ee80
fix: more lint
Kneesal df71266
test: add tests (#7435)
csiyang 14fa288
fix: add language screen card test
Kneesal f28cd5c
Merge branch 'feature/25-00-NC-feat-church-invites' of https://github…
Kneesal 609701b
feat: customize template button (#7445)
csiyang 4980798
fix: tests for language screen
Kneesal 4a1e9d6
Merge branch 'feature/25-00-NC-feat-church-invites' of https://github…
Kneesal 0824746
fix: comment out edit manually
Kneesal 2b7b63f
refactor: multi step form (#7448)
csiyang 697e881
fix: tests
Kneesal 17ffd3c
Merge branch 'feature/25-00-NC-feat-church-invites' of https://github…
Kneesal 5b0da5b
fix: share drawere intial tests
Kneesal 30b6cf3
fix: tests
Kneesal 64b591d
fix: tests
Kneesal 14a1eb2
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal d0e3059
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 3f9e9d4
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 6c710f2
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 59e2a6d
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 47cf5a8
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Ur-imazing 9fc52f4
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Ur-imazing e52092b
fix: CustomizeTemplateButton unit test
Ur-imazing 759854b
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Ur-imazing e06061f
fix: text screen form submission (#7580)
Ur-imazing b0d3039
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Ur-imazing 48292ed
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Ur-imazing 6b28aef
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 966335a
chore: multi step form styling refactor (#7585)
Ur-imazing 1264cb6
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 7d6c936
fix: link screen not pulling links into customize page (#7608)
Ur-imazing b71123b
chore: add styling to progress stepper (#7583)
Ur-imazing daf7551
fix: language screen language filter (#7625)
Kneesal 37513be
feat: add styling to customize text screen (#7588)
Ur-imazing 4e9acc9
fix: active step qol
Kneesal 22014da
Merge branch 'feature/25-00-NC-feat-church-invites' of https://github…
Kneesal 1595809
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 70a3f99
fix: codegen
Kneesal 16a6a5c
Merge branch 'feature/25-00-NC-feat-church-invites' of https://github…
Kneesal 4fc4bbd
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 5f5d4df
feat: add social screen image and text edit components (#7638)
Ur-imazing c582a38
fix: use this template button to take user to customize (#7646)
Kneesal 40413ce
Merge remote-tracking branch 'origin/main' into feature/25-00-NC-feat…
Kneesal 70c24b0
fix: skip screens that are not customizable (#7651)
Kneesal c2a04a6
feat: update share dialog style (#7652)
Ur-imazing d9036cb
fix: minor style changes (#7662)
Kneesal 6ec39bc
feat: style done screen and add share functionality (#7663)
Ur-imazing 5da3756
Merge remote-tracking branch 'origin/main' into feature/25-00-NC-feat…
Kneesal c774780
fix: link screen cards (#7677)
Kneesal 832392f
fix: add customize variant (#7675)
Kneesal 4f990ae
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 93c9335
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal d729b51
feat: add styling to link screen (#7668)
Ur-imazing 686f22e
fix: default text for done screen (#7681)
Kneesal 8c6b9ce
feat: language screen styling (#7682)
Ur-imazing 0d454f5
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 79649cf
feat: add special case for done screen stepper node (#7690)
Ur-imazing 59ac4cf
feat: truncate long journey descriptions to one line on the done scre…
Ur-imazing 339fcf6
feat: social screen open device default photo library (#7691)
Kneesal 42e082f
fix: hide edit manually button from language screen (#7731)
Ur-imazing 227f9ad
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Ur-imazing 5a5c9b9
fix: show resolved customizable text for response field properties in…
Ur-imazing 7704f3e
fix: easier language variant creator for publishers (#7732)
Kneesal eb68dcf
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 848907c
feat: prevent text input into title or description edit fields when c…
Ur-imazing 08345ef
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 4adea75
fix: remove markdown from step block nodes in journey flow for non-te…
Ur-imazing 17bfdad
fix: curly brackets customization in editor mode (#7753)
Kneesal 9cf7562
feat: update CTA button in template footer with UseThisTemplateButton…
Ur-imazing 0a036bd
feat: redirect attempts to access customization flow via manual URL (…
Ur-imazing b9b74b4
fix: consume ld flags in page props
Kneesal 7c06d2c
fix: page wrapper (#7754)
Kneesal d4df347
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 9088855
fix: remove braces in poll and buttons (#7756)
Kneesal f5fc9d3
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Kneesal 4fa3f3b
fix: disable translate on publisher child templates (#7766)
Kneesal 0ec6e2a
feat: persist customizable toggle for link and email actions (#7757)
Ur-imazing 65e2bf2
Merge branch 'main' into feature/25-00-NC-feat-church-invites
Ur-imazing 6f09d17
fix: unify customization flow next step button styling
Ur-imazing 80e2581
fix: lint issues
autofix-ci[bot] b2381d3
Merge remote-tracking branch 'origin' into urimchae/nes-856-unify-sty…
Ur-imazing 6f26565
chore: refactor next step button into dedicated CustomizeFlowNextButt…
Ur-imazing fd48e28
Merge branch 'main' into urimchae/nes-856-unify-styling-of-next-butto…
Ur-imazing abdda2b
chore: remove redundant code from button tests
Ur-imazing b080728
Merge branch 'main' into urimchae/nes-856-unify-styling-of-next-butto…
Ur-imazing e356c44
fix: lint issues
autofix-ci[bot] 3423ce5
feat: change customize flow next button label
Ur-imazing b265a01
Merge branch 'urimchae/nes-856-unify-styling-of-next-buttons-other-mi…
Ur-imazing ed1be9d
Merge branch 'main' into urimchae/nes-856-unify-styling-of-next-butto…
Ur-imazing b2c9bd0
feat: unify mobile and desktop button style
Ur-imazing d63faf8
fix: lint issues
autofix-ci[bot] ccc82d7
chore: made label prop of customize flow next button non-nullable
Ur-imazing 12b2a4e
Merge branch 'main' into urimchae/nes-856-unify-styling-of-next-butto…
Ur-imazing 89c003b
feat: tweak typography variant
Ur-imazing 4eeb32d
Merge branch 'main' into urimchae/nes-856-unify-styling-of-next-butto…
Ur-imazing a694adf
Merge remote-tracking branch 'origin' into urimchae/nes-856-unify-sty…
Ur-imazing 6d6a5a1
fix: lint issues
autofix-ci[bot] 7e24880
Merge branch 'main' into urimchae/nes-856-unify-styling-of-next-butto…
Ur-imazing 9a9a774
Merge branch 'main' into urimchae/nes-856-unify-styling-of-next-butto…
Ur-imazing cfdec1c
Merge branch 'main' into urimchae/nes-856-unify-styling-of-next-butto…
Ur-imazing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
101 changes: 101 additions & 0 deletions
101
...plateCustomization/MultiStepForm/CustomizeFlowNextButton/CustomizeFlowNextButton.spec.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import { fireEvent, render, screen } from '@testing-library/react' | ||
|
||
import { CustomizeFlowNextButton } from './CustomizeFlowNextButton' | ||
|
||
describe('CustomizeFlowNextButton', () => { | ||
const defaultProps = { | ||
label: 'New Next Button' | ||
} | ||
|
||
beforeEach(() => { | ||
jest.clearAllMocks() | ||
}) | ||
|
||
it('should render the button with default props', () => { | ||
render(<CustomizeFlowNextButton {...defaultProps} />) | ||
|
||
const button = screen.getByTestId('CustomizeFlowNextButton') | ||
expect(button).toBeInTheDocument() | ||
expect(button).toHaveAttribute('type', 'button') | ||
expect(button).not.toBeDisabled() | ||
expect(screen.getByText('New Next Button')).toBeInTheDocument() | ||
}) | ||
|
||
it('should render button end adornment', () => { | ||
render(<CustomizeFlowNextButton {...defaultProps} />) | ||
|
||
const button = screen.getByTestId('CustomizeFlowNextButton') | ||
expect(button.querySelector('svg')).toBeInTheDocument() | ||
}) | ||
|
||
it('should render as disabled when disabled prop is true', () => { | ||
render(<CustomizeFlowNextButton {...defaultProps} disabled />) | ||
|
||
const button = screen.getByTestId('CustomizeFlowNextButton') | ||
expect(button).toBeDisabled() | ||
}) | ||
|
||
it('should render with submit type when type is submit', () => { | ||
render(<CustomizeFlowNextButton {...defaultProps} type="submit" />) | ||
|
||
const button = screen.getByTestId('CustomizeFlowNextButton') | ||
expect(button).toHaveAttribute('type', 'submit') | ||
}) | ||
|
||
it('should render with form attribute when form prop is provided', () => { | ||
render(<CustomizeFlowNextButton {...defaultProps} form="test-form" />) | ||
|
||
const button = screen.getByTestId('CustomizeFlowNextButton') | ||
expect(button).toHaveAttribute('form', 'test-form') | ||
}) | ||
|
||
it('should handle empty string label', () => { | ||
render(<CustomizeFlowNextButton label="" />) | ||
|
||
const button = screen.getByTestId('CustomizeFlowNextButton') | ||
expect(button).toBeInTheDocument() | ||
|
||
const typography = button.querySelector('.MuiTypography-root') | ||
expect(typography).toBeInTheDocument() | ||
expect(typography).toHaveTextContent('') | ||
}) | ||
|
||
it('should call onClick handler when clicked', () => { | ||
const handleClick = jest.fn() | ||
render(<CustomizeFlowNextButton {...defaultProps} onClick={handleClick} />) | ||
|
||
const button = screen.getByTestId('CustomizeFlowNextButton') | ||
fireEvent.click(button) | ||
expect(handleClick).toHaveBeenCalledTimes(1) | ||
}) | ||
|
||
it('should not call onClick when disabled', () => { | ||
const handleClick = jest.fn() | ||
render( | ||
<CustomizeFlowNextButton | ||
{...defaultProps} | ||
onClick={handleClick} | ||
disabled | ||
/> | ||
) | ||
|
||
const button = screen.getByTestId('CustomizeFlowNextButton') | ||
fireEvent.click(button) | ||
expect(handleClick).not.toHaveBeenCalled() | ||
}) | ||
|
||
it('should not call onClick when loading', () => { | ||
const handleClick = jest.fn() | ||
render( | ||
<CustomizeFlowNextButton | ||
{...defaultProps} | ||
onClick={handleClick} | ||
loading | ||
/> | ||
) | ||
|
||
const button = screen.getByTestId('CustomizeFlowNextButton') | ||
fireEvent.click(button) | ||
expect(handleClick).not.toHaveBeenCalled() | ||
}) | ||
}) |
63 changes: 63 additions & 0 deletions
63
...s/TemplateCustomization/MultiStepForm/CustomizeFlowNextButton/CustomizeFlowNextButton.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import Button from '@mui/material/Button' | ||
import Stack from '@mui/material/Stack' | ||
import Typography from '@mui/material/Typography' | ||
import { SxProps, Theme } from '@mui/material/styles' | ||
import { ReactElement } from 'react' | ||
|
||
import ArrowRightIcon from '@core/shared/ui/icons/ArrowRight' | ||
|
||
import { | ||
BUTTON_NEXT_STEP_WIDTH, | ||
BUTTON_NEXT_STEP_HEIGHT | ||
} from '../../utils/sharedStyles' | ||
|
||
interface CustomizeFlowNextButtonProps { | ||
label: string | ||
loading?: boolean | ||
disabled?: boolean | ||
type?: 'button' | 'submit' | ||
form?: string | ||
ariaLabel?: string | ||
onClick?: () => void | ||
sx?: SxProps<Theme> | ||
} | ||
|
||
export const CustomizeFlowNextButton = ({ | ||
label, | ||
loading = false, | ||
disabled = false, | ||
type = 'button', | ||
form, | ||
ariaLabel, | ||
onClick, | ||
sx = {} | ||
}: CustomizeFlowNextButtonProps): ReactElement => { | ||
return ( | ||
<Button | ||
variant="contained" | ||
color="secondary" | ||
type={type} | ||
form={form} | ||
onClick={onClick} | ||
loading={loading} | ||
disabled={disabled} | ||
aria-label={ariaLabel} | ||
data-testid="CustomizeFlowNextButton" | ||
sx={{ | ||
width: BUTTON_NEXT_STEP_WIDTH, | ||
height: BUTTON_NEXT_STEP_HEIGHT, | ||
alignSelf: 'center', | ||
mt: { xs: 6, sm: 4 }, | ||
borderRadius: 2, | ||
...sx | ||
}} | ||
> | ||
<Stack direction="row" alignItems="center" gap={1}> | ||
<Typography variant="body1" sx={{ fontWeight: 'bold' }}> | ||
{label} | ||
</Typography> | ||
<ArrowRightIcon sx={{ fontSize: 24 }} /> | ||
</Stack> | ||
</Button> | ||
) | ||
} |
1 change: 1 addition & 0 deletions
1
...admin/src/components/TemplateCustomization/MultiStepForm/CustomizeFlowNextButton/index.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { CustomizeFlowNextButton } from './CustomizeFlowNextButton' |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.