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: [M3-7400] - Linode Network Transfer History - Back button incorrectly disabled #9900

Merged

Conversation

bnussman-akamai
Copy link
Member

@bnussman-akamai bnussman-akamai commented Nov 14, 2023

Description 📝

Fixes back button disabled state on the Linode Details network tab

Preview 📷

Before After
Screenshot 2023-11-14 at 9 51 10 AM Screenshot 2023-11-14 at 9 57 07 AM

How to test 🧪

Prerequisites

  • You must have a Linode that has > 1 month of network data to show on the graph

Reproduction steps

Verification steps

  • Verify the button appears to be enabled when there is past network history to be viewed

As an Author I have considered 🤔

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@bnussman-akamai bnussman-akamai added Bug Fixes for regressions or bugs UX/UI Changes for UI/UX to review labels Nov 14, 2023
@bnussman-akamai bnussman-akamai self-assigned this Nov 14, 2023
@bnussman-akamai bnussman-akamai requested a review from a team as a code owner November 14, 2023 15:01
@bnussman-akamai bnussman-akamai requested review from cpathipa and cliu-akamai and removed request for a team November 14, 2023 15:01
>
<ArrowBackIosIcon
sx={{
...(monthOffset === minMonthOffset
Copy link
Member Author

Choose a reason for hiding this comment

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

This was the main bug 🐛. minMonthOffset should be maxMonthOffset here.

The easy fix would be to change minMonthOffset ➡️ maxMonthOffset but I decided to go ahead and switch these one-off styled buttons to IconButtons with color of primary. This basically recreates the same style, just in a more maintainable way

Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

Nice fix and good catch with the disabled-but-still-clickable back button in prod. 🔍

With a linode older than 30 days, I confirmed the back button was enabled as expected until I reached the month of its creation. Styles looked good in both light and dark mode.

</Box>
</Box>
{renderStatsGraph()}
</div>
);
});

const sxArrowIconDisabled = (theme: Theme) => ({
cursor: 'not-allowed',
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm okay with losing this cursor style because the disabled arrow seems clear enough without the 🚫 cursor and I think we only change the cursor on disabled buttons in a handful of places, but wanted to point out it is a change in case it wasn't intended or anyone has other thoughts.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm in line with showing a 🚫 cursor on actionable items. IMO, it adds an additional layer of visual clarity and facilitates international understanding, indicating that the actionable item is disabled for some reason. This is unless we choose the design option of removing the 🚫. I think this could be a good topic for our cafe meeting to improve consistency.

Copy link
Member Author

Choose a reason for hiding this comment

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

My fault for not calling out the change in the PR description. We did lose the not-allowed cursor.

I liked the cursor effect, but I hate to write one-off styles for it... That's why I was okay with removing it. Open to re-adding it

Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're not consistent about it across the app already, I think it's not a huge deal to remove it here. But I do think @cpathipa has a good point that this could be worth discussing with UX in cafe to see if we want to apply this cursor treatment more consistently. If there's a consensus of 'yes' that we should, another tech story ticket can revisit this and other places.

Copy link
Contributor

@cpathipa cpathipa left a comment

Choose a reason for hiding this comment

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

Confirming back button is enabled and actionable.
image

@bnussman-akamai bnussman-akamai merged commit f27fd63 into linode:develop Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fixes for regressions or bugs UX/UI Changes for UI/UX to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants