-
Notifications
You must be signed in to change notification settings - Fork 111
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
[C-3354, C-3396, C-3397] Sign up QA #6780
Changes from 10 commits
6f42c28
7d24f13
57e4ed7
aeb22a4
8d983cb
8274260
ab8ba45
0cf4457
d6e3c59
2d2c721
990af18
99c4e5d
64412a2
469b60a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||||
import { createContext } from 'react' | ||||||
import { createContext, useContext } from 'react' | ||||||
|
||||||
import type { AudiusSdk } from '@audius/sdk' | ||||||
import type { Dispatch } from 'redux' | ||||||
|
@@ -22,3 +22,15 @@ export type AudiusQueryContextType = { | |||||
export const AudiusQueryContext = createContext<AudiusQueryContextType | null>( | ||||||
null | ||||||
) | ||||||
|
||||||
export const useAudiusQueryContext = () => { | ||||||
const audiusQueryContext = useContext(AudiusQueryContext) | ||||||
|
||||||
if (!audiusQueryContext) { | ||||||
throw new Error( | ||||||
'useQueryContext has to be used within <AudiusQueryContext.Provider>' | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
) | ||||||
} | ||||||
|
||||||
return audiusQueryContext | ||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ export const BaseButton = forwardRef<HTMLButtonElement, BaseButtonProps>( | |
const { | ||
iconLeft: LeftIconComponent, | ||
iconRight: RightIconComponent, | ||
isStaticIcon, | ||
disabled, | ||
isLoading, | ||
widthToHideText, | ||
|
@@ -93,7 +94,7 @@ export const BaseButton = forwardRef<HTMLButtonElement, BaseButtonProps>( | |
}) | ||
} | ||
|
||
const iconCss = { | ||
const iconCss = !isStaticIcon && { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this fixes issue where metamask icon was being slightly overriden by the button icon styles |
||
'& path': { | ||
fill: 'currentcolor' | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,8 @@ export const Divider = (props: DividerProps) => { | |
...(!children && | ||
orientation === 'vertical' && { | ||
borderRight: border, | ||
alignSelf: 'stretch' | ||
alignSelf: 'stretch', | ||
height: 'auto' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixes issue where vertical divider was not working in all contexts. |
||
}), | ||
...(!children && | ||
orientation === 'horizontal' && { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ import type { | |
ShadowOptions | ||
} from 'foundations' | ||
|
||
import type { FlexProps } from '../Flex' | ||
|
||
/** | ||
* An elevated container which stands out from the background. | ||
*/ | ||
|
@@ -15,7 +13,7 @@ export type PaperProps = { | |
* Background Color | ||
* @default white | ||
*/ | ||
backgroundColor?: Exclude<BackgroundColors, 'default'> | ||
backgroundColor?: BackgroundColors | ||
Comment on lines
14
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bit weird now that 'default' is an option but not the default option. I guess it's ok though could argue it's an issue with naming semantic colors 'default' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, but sure why I removed that actually... will investigate |
||
|
||
/** | ||
* Border type. If not provided, no border will be used. | ||
|
@@ -33,5 +31,5 @@ export type PaperProps = { | |
* Elevation Shadow | ||
* @default mid | ||
*/ | ||
shadow?: Exclude<ShadowOptions, 'drop'> | 'none' | ||
} & FlexProps | ||
shadow?: Exclude<ShadowOptions, 'drop'> | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ const meta: Meta<typeof TextLink> = { | |
render: (props) => ( | ||
<Flex direction='row' gap='4xl'> | ||
<TextLink {...props} /> | ||
<TextLink {...props} _isHovered /> | ||
<TextLink {...props} showUnderline /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sometimes we want links to stand out from text that has the same color |
||
</Flex> | ||
) | ||
} | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { PasswordInput, PasswordInputProps } from '@audius/harmony' | ||
import { useField } from 'formik' | ||
|
||
export type PasswordFieldProps = PasswordInputProps & { | ||
name: string | ||
} | ||
|
||
export const PasswordField = (props: PasswordFieldProps) => { | ||
const { name, ...other } = props | ||
const [field, { touched, error }] = useField(name) | ||
|
||
const hasError = Boolean(touched && error) | ||
|
||
return <PasswordInput {...field} error={hasError} {...other} /> | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { forwardRef, useEffect, useRef, useState } from 'react' | ||
import { Fragment, forwardRef, useEffect, useRef, useState } from 'react' | ||
|
||
import { Flex, IconComponent, Text } from '@audius/harmony' | ||
import { Box, Flex, IconComponent, Text } from '@audius/harmony' | ||
|
||
import { Divider } from 'components/divider' | ||
|
||
|
@@ -73,10 +73,10 @@ export const SteppedProgress = ({ | |
return () => window.removeEventListener('resize', setTabPosition) | ||
}, [activeStep, steps]) | ||
return ( | ||
<> | ||
<Box> | ||
<Flex alignItems='center' gap='s'> | ||
{steps.map((s, i) => ( | ||
<> | ||
<Fragment key={s.key}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh neat. Didn't know key worked on fragment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah i wish you could just apply it to the |
||
<Step | ||
ref={(el) => { | ||
if (el) { | ||
|
@@ -86,18 +86,17 @@ export const SteppedProgress = ({ | |
icon={s.icon} | ||
label={s.label} | ||
isActive={activeStep === s.key} | ||
key={s.key} | ||
/> | ||
{i !== steps.length - 1 ? ( | ||
<Divider className={styles.connector} variant='default' /> | ||
) : null} | ||
</> | ||
</Fragment> | ||
))} | ||
</Flex> | ||
<span | ||
className={styles.underline} | ||
style={{ left: stepUnderlineLeft, width: stepUnderlineWidth }} | ||
/> | ||
</> | ||
</Box> | ||
) | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this prevents the null checks on all the context