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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UI issues after introducing new button design system #43663

Merged
merged 14 commits into from
Jul 10, 2024

Conversation

bl-nero
Copy link
Contributor

@bl-nero bl-nero commented Jun 28, 2024

This PR:

  • fixes minor UI issues, mostly margins and capitalizations
  • changes button height on the login form, but doesn't yet address the full scope of design changes for the SSO buttons (awaiting final opinion from the UX team)
  • replaces resource enrollment buttons with something that doesn't look like a CTA if the resource lists are not empty
  • adds intent indications to the file transfer requests UI

Caveat: since we are abandoning button capitalization, existing SSO buttons may look weird for those who have all-lowercase names of their SSO connectors. We may need to issue an announcement to our users about using the displayName connector property to fix this.

Before After
Screenshot 2024-07-03 at 11 45 05 Screenshot 2024-07-03 at 11 45 14
Screenshot 2024-07-03 at 11 49 24 Screenshot 2024-07-03 at 11 49 34
Screenshot 2024-07-03 at 11 51 04 Screenshot 2024-07-03 at 11 51 10
Screenshot 2024-07-03 at 11 55 12 Screenshot 2024-07-03 at 11 55 22
Screenshot 2024-07-03 at 12 05 15 Screenshot 2024-07-03 at 12 05 21
Screenshot 2024-07-03 at 12 20 33 Screenshot 2024-07-03 at 12 29 15
Screenshot 2024-07-03 at 16 39 29 Screenshot 2024-07-03 at 16 40 14

Closes #43175

@bl-nero bl-nero marked this pull request as ready for review July 3, 2024 15:11
Copy link

github-actions bot commented Jul 3, 2024

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@bl-nero bl-nero added the no-changelog Indicates that a PR does not require a changelog entry label Jul 4, 2024
Base automatically changed from bl-nero/buttons to master July 4, 2024 11:06
Copy link
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll continue the review tomorrow.

@@ -46,6 +46,7 @@ const StyledButtonLink = styled.a`
&:hover,
&:focus {
color: ${({ theme }) => theme.colors.buttons.link.hover};
box-shadow: none;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it shouldn't have a background on hover either. The way I think about it is that ButtonLink is supposed to behave just like Link.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're probably right. I'll change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not going to change it right now, because it breaks a bit in places where link buttons are placed on a red background (the text turns illegible). As this coincides with your another comment, I'll fix it properly after I deal with the alert banners.

@ravicious ravicious self-requested a review July 4, 2024 12:29
Comment on lines 61 to +67
<ButtonBorder
height="24px"
size="small"
setRef={e => (this.anchorEl = e)}
onClick={this.onOpen}
{...buttonProps}
>
{this.props.buttonText || 'OPTIONS'}
<ChevronDown ml={2} mr={-2} size="small" color="text.slightlyMuted" />
{this.props.buttonText || 'Options'}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just my opinion, but it's quite distracting for me how <Button fill="border"> loses its border on hover. 😅 But I suspect it was hard to represent the difference between all five states without this.

@@ -63,14 +71,16 @@ export default function TrustedClusters() {
<FeatureHeader alignItems="center">
<FeatureHeaderTitle>Trusted Clusters</FeatureHeaderTitle>
{hasClusters && (
<ButtonPrimary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's another place where ButtonPrimary is used in this file. Should it be removed as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because this is an empty state with an actual CTA (the user has no trusted clusters, therefore this is the action that we recommend).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Off topic, but I think disabled in the context of this component has been used as "A value that you cannot change because it's supposed to be hardcoded and always sent to the server", which should semantically be represented as readonly. disabled inputs are not sent to the server by the browser.

web/packages/design/src/Button/buttons.story.tsx Outdated Show resolved Hide resolved
<ButtonLink onClick={onRetryClicked}>Retry</ButtonLink>
<Button type="button" onClick={onRetryClicked}>
Retry
</Button>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This button didn't look quite right. I changed it a little bit, but it still doesn't look the best. idk what to do here, as we can't use fill any other than filled, because otherwise it blends with the red background. Also I wish the language server would suggest me "custom-defined" props first, because now if I place my cursor inside Button and ask my editor what props are available, it suggests me a bunch of aria props. ;f

@gzdunek Do you remember if there was a reason ButtonLink was used here instead of Button? This link doesn't have a href and we add onClick on it, which makes Button more suitable for it.

Before After
retry-before retry-after

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gzdunek Do you remember if there was a reason ButtonLink was used here instead of Button? This link doesn't have a href and we add onClick on it, which makes Button more suitable for it.

Hmm it wasn't me who added that button 😅 but I agree, Buttons fits better here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I just did a quick git blame and didn't dig further. 😏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to leave it as is, since it's exactly how it looks now, and one of the next steps on my roadmap is to deal with the error banners, which will include modernizing their action buttons: https://www.figma.com/design/Gpjs9vjhzUKF1GDbeG9JGE/Application-Design-System?node-id=8890-5504&m=dev

@@ -33,6 +33,7 @@ export type FileTransferRequest = {
sid: string;
requestID: string;
requester: string;
/** A list of accounts that approved this request. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@bl-nero bl-nero enabled auto-merge July 10, 2024 09:42
@bl-nero bl-nero added this pull request to the merge queue Jul 10, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 10, 2024
@bl-nero bl-nero enabled auto-merge July 10, 2024 18:02
@bl-nero bl-nero added this pull request to the merge queue Jul 10, 2024
Merged via the queue into master with commit ed2f1b6 Jul 10, 2024
38 checks passed
@bl-nero bl-nero deleted the bl-nero/buttons-2 branch July 10, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/sm ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants