-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix/url modal #466
Fix/url modal #466
Changes from 6 commits
cbd337f
c303840
827db58
06563c4
1d17a0b
201caa4
283013f
277e9a4
8a5c34c
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,11 +1,30 @@ | ||
.file-upload :global(.ant-upload-list) { | ||
min-height: 30px; | ||
} | ||
.file-upload :global(.ant-upload-list-item):hover, | ||
.file-upload :global(.ant-upload-list-item-list-type-text):focus, | ||
.file-upload :global(.ant-upload-list-item-list-type-text) :global(.ant-upload-list-item-info):hover { | ||
background-color: transparent; | ||
} | ||
|
||
.file-upload :global(.ant-upload-list-item-card-actions-btn) { | ||
border: none; | ||
} | ||
|
||
.file-upload :global(.ant-upload-list-item-card-actions-btn) { | ||
opacity: initial; | ||
} | ||
|
||
.file-upload :global(.ant-upload-list-item-card-actions-btn) svg { | ||
color: #d14040; | ||
} | ||
|
||
.file-upload :global(.ant-upload-list-text .ant-upload-list-item-name) { | ||
padding: 0; | ||
} | ||
|
||
.file-upload :global(.ant-upload-span) { | ||
justify-content: flex-start; | ||
width: max-content; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ const ShareTrajectoryButton = ({ | |
const tooltipOffset = isDisabled ? [0, -30] : [0, -18]; | ||
|
||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.container} onClick={handleShare}> | ||
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. Accessibility note: prefer using button over div for 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. it's a little bit of a weird thing since this is wrapping another button. I think the Dom would have a problem with a button within a button? but I can try 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, 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. Is there a reason why the 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, if you try it out on staging the click area is tiny. I tried other fixes but this was the only thing that got the target to be the whole button 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. Okay... maybe try adding a role attribute to signal that the div can be treated like a button? https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role I opened up the Simularium website and realized the entire site doesn't seem to work well with tab navigation, so there may be bigger fish to fry... 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. your questions made me dive deeper into what was causing the button to be unclickable and I realized it was the tooltip placement. when the tooltip opens it actually covers the target because it had been aligned over the top. So I reverted this change and fixed that on a separate branch. |
||
{isSharing ? ( | ||
<div className={styles.overlay}> | ||
<ShareTrajectoryModal | ||
|
@@ -51,7 +51,6 @@ const ShareTrajectoryButton = ({ | |
> | ||
<Button | ||
className={isDisabled ? styles.disabled : undefined} | ||
onClick={handleShare} | ||
type="primary" | ||
disabled={isDisabled} | ||
> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,42 @@ | ||
/* Default and primary button colors differ within modals */ | ||
.light-theme :global(.ant-btn-default) { | ||
background-color: var(--light-button-default-background); | ||
border-color: var(--light-theme-modal-btn-default-color); | ||
color: var(--light-button-default-color); | ||
|
||
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. updated to match this styling |
||
/* primary button */ | ||
.light-theme :global(.primary-button), | ||
modal :global(.primary-button):focus { | ||
border: 1px solid var(--light-theme-button-primary-bg); | ||
border-radius: 3px; | ||
background-color: var(--light-theme-button-primary-bg); | ||
color: var(--light-theme-button-primary-text); | ||
} | ||
|
||
.light-theme :global(.primary-button):hover { | ||
color: var(--light-theme-button-primary-text-hove); | ||
border: 1px solid var(--light-theme-button-primary-border-hover); | ||
} | ||
|
||
.light-theme :global(.ant-btn-primary) { | ||
background-color: var(--light-theme-btn-primary-bg); | ||
border: var(--light-button-primary-border); | ||
color: var(--light-theme-btn-primary-color); | ||
.light-theme :global(.primary-button):disabled { | ||
border: 1px solid var(--heather); | ||
color: var(--light-theme-button-primary-text-disabled); | ||
background-color: var(--light-theme-button-primary-bg-disabled); | ||
} | ||
|
||
.light-theme :global(.ant-btn-primary[disabled]) { | ||
background: var(--light-button-disabled-background); | ||
border: var(--light-button-disabled-border); | ||
color: var(--light-theme-btn-primary-color); | ||
/* secondary button */ | ||
.light-theme :global(.secondary-button), | ||
modal :global(.secondary-button):focus { | ||
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. Is 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 catch, the was a artifact from moving these from another style sheet |
||
border: 1px solid var(--light-theme-button-secondary-border); | ||
border-radius: 3px; | ||
background-color: transparent; | ||
color: var(--light-theme-button-secondary-text); | ||
} | ||
|
||
.light-theme :global(.ant-btn-text) { | ||
background-color: var(--dark-four); | ||
border-color: var(--dark-four); | ||
color: var(--white-three); | ||
.light-theme :global(.secondary-button):hover { | ||
background-color: var(--light-theme-button-secondary-bg-hover); | ||
color: var(--light-theme-button-secondary-text-hover); | ||
border: 1px solid var(--light-theme-button-secondary-border); | ||
} | ||
|
||
.light-theme :global(.secondary-button):disabled { | ||
border: 1px solid var(--light-theme-button-primary-border-disabled); | ||
color: var(--light-theme-button-secondary-text-disabled); | ||
background-color: transparent; | ||
} |
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 was the main offender