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

refactor: [M3-8059] - Clean up Main Content Banner #10430

Conversation

bnussman-akamai
Copy link
Member

@bnussman-akamai bnussman-akamai commented May 1, 2024

Description 📝

Refactors the MainContentBanner to be simpler, clean, and self-contained 🧹

(I'm doing this because I want to clean up and attempt to improve performance index.tsx, App.tsx, and MainContent.tsx)

Changes 🔄

  • Adds unit tests 🧪
  • Removes random utils placed in MainContent.tsx 🗑️
  • Removes extra state and uses preferences directly 👤 (this is fine because preferences optimistically update)

Preview 📷

Warning

I did make minor UI changes to the banner in efforts to simplify the styles

Screenshot 2024-05-01 at 3 17 05 PM

How to test 🧪

  • I included a mock flag in MainContentBanner.tsx you can use to test the banner 🏴
  • Verify styles look good on all viewports 🎨
  • Check my code for quality and test coverage 🔍

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 self-assigned this May 1, 2024
@bnussman-akamai bnussman-akamai requested a review from a team as a code owner May 1, 2024 20:20
@bnussman-akamai bnussman-akamai requested review from jdamore-linode and cpathipa and removed request for a team May 1, 2024 20:20
Copy link
Member Author

Choose a reason for hiding this comment

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

The diff is kind of crazy. The only significant changes here are:

  • Remove extra util functions 🗑️
  • Move position of <MainContentBanner />

Copy link

github-actions bot commented May 1, 2024

Coverage Report:
Base Coverage: 81.82%
Current Coverage: 82%

@bnussman-akamai bnussman-akamai merged commit 020e084 into linode:develop May 3, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants