-
Notifications
You must be signed in to change notification settings - Fork 2
MFA pairing UI/accessibility tweaks - design changes #270
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
jarosenb
merged 94 commits into
task/TUP-517--mfa-ui-tweaks
from
task/TUP-517--mfa-ui-tweaks--design-changes
Aug 2, 2023
Merged
Changes from all commits
Commits
Show all changes
94 commits
Select commit
Hold shift + click to select a range
772fcc6
refactor: move link to to docs (TUP-535:4,5)
wesleyboar f958384
refactor!: prepare for c-nav--piped (TUP-535:3)
wesleyboar bbce029
refactor: change 5m msg, get help link (TUP-535:6)
wesleyboar bb92b8c
refactor: change qr error to reuse a help modal
wesleyboar fa9aa7c
style: npx nx format:write
wesleyboar 0ec0fd2
refactor: simplify `qr-code-box` markup and styles
wesleyboar 6116bcd
refactor: use lists for mfa panels
wesleyboar d2ba130
fix: missing space before "Get help." link
wesleyboar 37dcb12
refactor: simpler messages (TUP-535:2.1.1+2.1.2)
wesleyboar 4e4ad51
refactor: let modal manage duplicate instances
wesleyboar 3081292
Merge branch 'task/TUP-517--mfa-ui-tweaks' into task/TUP-517--mfa-ui-…
wesleyboar 1d5ca09
fix: restore code that I had made text for testing
wesleyboar 59709fd
chore: remove now-unnecessary id form markup
wesleyboar 0b50542
feat: new message if QR code alt. is unavilable
wesleyboar 2d76c1a
fix: add periods to end of sentences…
wesleyboar 874445d
chore: remove now-unnecessary id from props
wesleyboar ef3ea72
chore: remove now-unnecessary id from props
wesleyboar 3d7133c
Merge branch 'task/TUP-517--mfa-ui-tweaks--design-changes' of github.…
wesleyboar fc49944
fix: load v2.13 c-nav component
wesleyboar cdf6a2e
chore: improve a comment
wesleyboar 6707584
style: npx nx format:write
wesleyboar eb77b11
fix: bad grammar in error message
wesleyboar 2ecd7f5
fix: bad grammar, remove please
wesleyboar 1866868
feat: TextCopyField.jsx to .tsx, and enable it
wesleyboar 28ef6ad
feat: TextCopyModal
wesleyboar f753720
fix: FieldWrapper, opt. req. & let desc. be React
wesleyboar fa7a910
fix: FieldWrapperFormik, let desc. be React
wesleyboar e3e45be
feat: text copy modal (TUP-535:2.1.3)
wesleyboar d4e1bd0
chore: uninstall react-copy-to-clipboard
wesleyboar 6152efa
feat: install @tacc/core-styles 2.14.0
wesleyboar 48efbdf
refactor: FieldWrapper mirror FeildWrapperFormik
wesleyboar dd6c8e3
feat: style text copy modal (TUP-535:2.1.3)
wesleyboar 0cf3f6e
npx nx format:write
wesleyboar caafb10
fix: qr code box was not 200px until image loaded
wesleyboar bcf682a
fix: remove test logic for msg. about qr alt. code
wesleyboar 6b8d862
fix: pass qr alt. verification code
wesleyboar e3ef9ae
feat: allow markup in label e.g. <a>
wesleyboar 26722e0
fix: markup in label should not be spaced by flex
wesleyboar 51f7642
fix: let core-styles style form error text
wesleyboar ec61a3d
fix: use FieldWrapper consistently and correctly
wesleyboar 7d401ab
chore: rename `qr-code-message` to `mfa-message`
wesleyboar ce524d6
chore: remove unused `ButtonWrapper`
wesleyboar 17a3d0d
chore: load sibling core-components from rel. path
wesleyboar cfb2977
chore: remove unused `SectionMessage` import
wesleyboar 1b7aad9
fix: resolve "circular dependency"
wesleyboar e306285
nx format:write
wesleyboar ee04665
fix: loose ends after "circular dependency" fix
wesleyboar 864279a
fix: fieldwrapper css duplication too confusing
wesleyboar 06bf969
chore: remove excess `<span>` tag
wesleyboar a49e17f
chore: no field wrapper desc unless desc exists
wesleyboar c4fdd87
npx nx format:write
wesleyboar 74ed6a7
fix: grammar error from design
wesleyboar 83e10bf
chore: use installed @core-styles, not CDN
wesleyboar cfe9d92
refactor: simplify TextCopyField (no CopyField)
wesleyboar 529b3e8
refactor: simplify TextCopyField (no ButtonWrapper)
wesleyboar 962d715
refactor: TextCopyModal hint → <TextCopyModalHint>
wesleyboar 03ba9a2
feat: support and add id attr to <Button>
wesleyboar b561e94
npx nx format:write
wesleyboar 538b72c
fix: qr code should resize w/ browser base font
wesleyboar 03779be
refactor: simplify qr code styles
wesleyboar ff0727a
refactor: use variable for qr code size
wesleyboar 165d16b
fix: increase qr coe size back to 200px not 160px
wesleyboar f2f325d
fix(a11y): status msg box needs role before msg
wesleyboar 7613a4f
fix(a11y): no use <label> text for <button> text
wesleyboar ff7d271
Revert "fix(a11y): status msg box needs role before msg"
wesleyboar 457a5d9
fix: add and pass id to TextCopyField
wesleyboar 97bf0bc
feat(a11y): title text for qr code img
wesleyboar d9aab1c
npx nx format:write
wesleyboar 9d1479f
feat: allow custom `tagName` for `<Message>`
wesleyboar 58faf33
chore: describe FieldWrapperFormik global css
wesleyboar 7c1e2da
refactor: replace FieldWrapper w/ upcoming s-form
wesleyboar ae380db
chore: remove FieldWrapper (not Formik)
wesleyboar 58e15e9
refactor:return feild wrap CSS to comp. as global
wesleyboar 0ab4bba
npx nx format:write
wesleyboar 4823620
refactor: simpler id assignment
wesleyboar 3e28e3b
fix: static mfa panel width so mfa-msg is centered
wesleyboar 74e5aae
refactor: no modal for text copty
wesleyboar d60583d
fix: restore accientally deleted conditions
wesleyboar eabd2bf
chore: remove component changes moved to PR #277
wesleyboar b6e1cb1
chore: remove component changes moved to PR #276
wesleyboar 97c6db1
chore: remove stray changes
wesleyboar 04e6c6d
fix: restore TypeScript TextCopyModal
wesleyboar aafcd92
fix: data.otpkey as var not text
wesleyboar 34d1b8e
fix: disable read-only fields, just to be safe
wesleyboar 429ee9e
refactor: use core-styles v2.15, not form.cms.css (#279)
wesleyboar 8bb2924
fix: alt. qr otp label as block instead of inline
wesleyboar 9827d10
fix: add space between mfa msg and section bottom
wesleyboar 90e26bc
fix: QR loading div was higher than button and img
wesleyboar 44c09e7
fix: darker danger color was not taking effect
wesleyboar e0c82ad
fix: core-styles v2.16.2
wesleyboar 6f4816a
fix: remove (now?) unnecessary <br />
wesleyboar bc24bff
fix: match action spacing, drop related deviations
wesleyboar 0333151
refactor: use SectionHeader / less duplicate code
wesleyboar e88f365
chore: nx format:write
wesleyboar 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
There are no files selected for viewing
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
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
91 changes: 0 additions & 91 deletions
91
libs/core-components/src/lib/TextCopyField/TextCopyField.jsx
This file was deleted.
Oops, something went wrong.
8 changes: 2 additions & 6 deletions
8
libs/core-components/src/lib/TextCopyField/TextCopyField.module.css
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
75 changes: 75 additions & 0 deletions
75
libs/core-components/src/lib/TextCopyField/TextCopyField.tsx
|
wesleyboar marked this conversation as resolved.
|
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,75 @@ | ||
| import React, { useCallback, useState } from 'react'; | ||
|
|
||
| import Button from '../Button'; | ||
|
|
||
| import styles from './TextCopyField.module.css'; | ||
|
|
||
| type TextCopyFieldProps = { | ||
| value: string; | ||
| placeholder?: string; | ||
| className?: string; | ||
| id?: string; | ||
| buttonClassName?: string; | ||
| }; | ||
|
|
||
| const TextCopyField: React.FC<TextCopyFieldProps> = ({ | ||
| value, | ||
| placeholder, | ||
| className, | ||
| id, | ||
| buttonClassName, | ||
| }) => { | ||
| /* WARNING: Must match CSS `--transition-duration` */ | ||
| const transitionDuration = 0.15; // second(s) | ||
| const stateDuration = 1; // second(s) | ||
| const stateTimeout = transitionDuration + stateDuration; // second(s) | ||
|
|
||
| const [isCopied, setIsCopied] = useState(false); | ||
|
|
||
| const onCopy = useCallback(() => { | ||
| navigator.clipboard.writeText(value); | ||
| setIsCopied(true); | ||
|
|
||
| const timeout = setTimeout(() => { | ||
| setIsCopied(false); | ||
| clearTimeout(timeout); | ||
| }, stateTimeout * 1000); | ||
| }, [value, setIsCopied, stateTimeout]); | ||
| const isEmpty = !value || value.length === 0; | ||
| const onChange = (event: React.ChangeEvent<HTMLInputElement>) => { | ||
| // Swallow keyboard events on the Input control, but | ||
| // still allow selecting the text. readOnly property of | ||
| // Input is not adequate for this purpose because it | ||
| // prevents text selection | ||
| event.preventDefault(); | ||
| }; | ||
|
|
||
| return ( | ||
| <> | ||
| <Button | ||
| className={`${styles['copy-button']} ${ | ||
| isCopied ? styles['is-copied'] : '' | ||
| } ${buttonClassName}`} | ||
| size="small" | ||
| onClick={onCopy} | ||
| disabled={isEmpty} | ||
| iconNameBefore={isCopied ? 'approved-reverse' : 'link'} | ||
| > | ||
| Copy | ||
| </Button> | ||
| <input | ||
| id={id} | ||
| type="text" | ||
| onChange={onChange} | ||
| value={value} | ||
| className={className} | ||
| placeholder={placeholder} | ||
| data-testid="input" | ||
| disabled | ||
| readOnly | ||
|
wesleyboar marked this conversation as resolved.
|
||
| /> | ||
| </> | ||
| ); | ||
| }; | ||
|
|
||
| export default TextCopyField; | ||
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.
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.