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

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

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.

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 462 passing tests on test run #5 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing462 Passing2 Skipped111m 49s

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants