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-8637] - Make EditableText UI component pure #11333

Conversation

bnussman-akamai
Copy link
Member

Description 📝

  • Fixes oversight in initial migration of EditableText from manager to ui 📁
  • Updates EditableText to not depend on react-router-dom to keep our new component library pure 💧
    • Adds a prop to EditableText that allows consumers to pass a CustomLink component
  • Unblocks pnpm - see this failure

Preview 📷

Screenshot 2024-11-26 at 2 17 14 PM

How to test 🧪

  • Check for regressions in Cloud Manager 👀
  • Test the component in Storybook 📖
  • Check new pattern for quality and correctness. Let me know if there is a better way to approach this 🗣️

Author Checklists

As an Author, to speed up the review process, I 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


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

This looks great to me, and the best approach I can think of.

Now, I feel like this brings a bigger question. Until what point do we decide to make a component pure and move it to the UI library?

Asking those question because our definition of pure perhaps needs clarification. Is a component pure because it does not use a third party package, or is its lack of side effects (btw it should be both!) - but in this case EditableText isn't pure, mainly because of its callbacks.

@bnussman-akamai bnussman-akamai marked this pull request as ready for review December 2, 2024 23:01
@bnussman-akamai bnussman-akamai requested a review from a team as a code owner December 2, 2024 23:01
@bnussman-akamai bnussman-akamai requested review from coliu-akamai and harsh-akamai and removed request for a team December 2, 2024 23:01
@bnussman-akamai
Copy link
Member Author

Thanks for the help 🙏

Ready for another round of reviews @abailly-akamai @jaalah-akamai

Copy link

github-actions bot commented Dec 13, 2024

Coverage Report:
Base Coverage: 86.98%
Current Coverage: 86.97%

Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

Nice!!

Copy link
Contributor

@coliu-akamai coliu-akamai left a comment

Choose a reason for hiding this comment

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

✅ storybook
✅ cloud manager - didn't catch any regressions

thank you!

@bnussman-akamai bnussman-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Dec 17, 2024
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 469 passing tests on test run #9 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing469 Passing2 Skipped101m 27s

@bnussman-akamai bnussman-akamai merged commit b494346 into linode:develop Dec 18, 2024
23 checks passed
Copy link

cypress bot commented Dec 18, 2024

Cloud Manager E2E    Run #6988

Run Properties:  status check passed Passed #6988  •  git commit b4943466e7: refactor: [M3-8637] - Make `EditableText` UI component pure (#11333)
Project Cloud Manager E2E
Branch Review develop
Run status status check passed Passed #6988
Run duration 26m 11s
Commit git commit b4943466e7: refactor: [M3-8637] - Make `EditableText` UI component pure (#11333)
Committer Banks Nussman
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 469
View all changes introduced in this branch ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Modularization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants