Skip to content

change: [UIE-8744] - Replace text field in DBaaS create page with Akamai CDS text field Web Component #12225

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

grevanak-akamai
Copy link
Contributor

@grevanak-akamai grevanak-akamai commented May 15, 2025

Description 📝

This PR is to replace text field in DBAAS create DB cluster page with Akamai CDS text field Web Component.

Changes 🔄

  • Replaced text field in DBaaS create DB cluster page with Akamai CDS text field Web Component.
  • No other text fields are replaced as they are components that are used in features outside DBaaS as well.

Target release date 🗓️

6/3

Preview 📷

Before After
Screenshot 2025-05-15 at 6 09 00 PM Screenshot 2025-05-15 at 6 09 42 PM

How to test 🧪

  • Go to Databases -> Create Database cluster
  • Verify text field under cluster label field.

Verification steps

  • Cluster label text field under create Database cluster should work same as before. All the validations should behave the same.
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

@grevanak-akamai grevanak-akamai requested a review from a team as a code owner May 15, 2025 12:57
@grevanak-akamai grevanak-akamai requested review from dwiley-akamai and pmakode-akamai and removed request for a team May 15, 2025 12:57
@cpathipa cpathipa added the DBaaS Relates to Database as a Service label May 15, 2025
@cpathipa cpathipa self-requested a review May 16, 2025 14:41
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.

Heads up unit tests are failing for Select component.
image

"@linode/manager": Changed
---

Replace the text field component under DBAAS create DB cluster page with Akamai CDS text field web component ([#12225](https://github.com/linode/manager/pull/12225))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Replace the text field component under DBAAS create DB cluster page with Akamai CDS text field web component ([#12225](https://github.com/linode/manager/pull/12225))
DBaaS: Replace the text field component under DBAAS create DB cluster page with Akamai CDS text field web component ([#12225](https://github.com/linode/manager/pull/12225))

@abailly-akamai
Copy link
Contributor

Is the title of this PR accurate?

@grevanak-akamai grevanak-akamai changed the title change: [UIE-8744] - Replace text field in DBaaS create page with Akamai CDS button Web Component change: [UIE-8744] - Replace text field in DBaaS create page with Akamai CDS text field Web Component May 16, 2025
@github-project-automation github-project-automation bot moved this from Review to Merged in Cloud Manager May 19, 2025
@grevanak-akamai
Copy link
Contributor Author

Heads up unit tests are failing for Select component. image

I'm not sure why it was failing as my changes are unrelated to this. After pulling latest code, it is working fine.

@abailly-akamai abailly-akamai removed their request for review May 19, 2025 13:32
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.

Overall LGTM! I didn't find any UI regressions, console warnings and tested accessibility with voiceover.


import { TextFieldWrapper } from './TextFieldWrapper';

describe('TextFieldWrapper', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: It would be nice if we can resolve all the lint warnings in this file.

Copy link
Contributor

Choose a reason for hiding this comment

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

^ I agree with this, particularly with regards to the warnings about the unnecessary await's

@cpathipa cpathipa added the Add'tl Approval Needed Waiting on another approval! label May 20, 2025
@cpathipa
Copy link
Contributor

We need approval form SDET on E2E tests - @jdamore-linode
cc: @jaalah-akamai

@cpathipa cpathipa requested a review from jdamore-linode May 21, 2025 13:46
@jdamore-linode
Copy link
Contributor

@cpathipa there aren't any E2E test changes on this PR, but I do see a unit test failure.

Copy link
Contributor

@dwiley-akamai dwiley-akamai left a comment

Choose a reason for hiding this comment

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

Parity in functionality for Cluster Label text field ✅
Code review ✅

"@linode/manager": Changed
---

DBaaS: Replace the text field component under DBAAS create DB cluster page with Akamai CDS text field web component ([#12225](https://github.com/linode/manager/pull/12225))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
DBaaS: Replace the text field component under DBAAS create DB cluster page with Akamai CDS text field web component ([#12225](https://github.com/linode/manager/pull/12225))
DBaaS: Replace the text field component on Database Create page with Akamai CDS text field web component ([#12225](https://github.com/linode/manager/pull/12225))


import { TextFieldWrapper } from './TextFieldWrapper';

describe('TextFieldWrapper', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

^ I agree with this, particularly with regards to the warnings about the unnecessary await's

Comment on lines +1 to +2
import { convertToKebabCase } from '@linode/ui';
import { Box, FormHelperText, InputLabel, TooltipIcon } from '@linode/ui';
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's consolidate these imports

Copy link
Contributor

Choose a reason for hiding this comment

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

@grevanak-akamai do you have prettier and eslint plugins? You can format on save.

value?: Value;
}

type Value = string | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the benefit to having this type over doing the below on L15 (aside from changing the type on L29 from Value to string | undefined)?

value?: string;

@github-project-automation github-project-automation bot moved this from Merged to Approved in Cloud Manager May 21, 2025
onChange={(e) =>
onChange?.(e as unknown as React.ChangeEvent<HTMLInputElement>)
}
ref={inputRef as React.RefObject<never>}
Copy link
Contributor

Choose a reason for hiding this comment

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

The castings here are concerning. Using web components shouldn't weaken the type safety of the application. as unknown as is usually a code smell that can have run time implications.

Copy link
Contributor

Choose a reason for hiding this comment

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

@grevanak-akamai can we fix this upstream in the components by correctly typing the events?

Comment on lines +1 to +2
import { convertToKebabCase } from '@linode/ui';
import { Box, FormHelperText, InputLabel, TooltipIcon } from '@linode/ui';
Copy link
Contributor

Choose a reason for hiding this comment

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

@grevanak-akamai do you have prettier and eslint plugins? You can format on save.


type TextFieldWrapperProps = BaseProps & InputToolTipProps;

export const TextFieldWrapper = (props: TextFieldWrapperProps) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than creating a wrapper we should replace the source directly in order to get an accurate performance test.

Copy link
Contributor

Choose a reason for hiding this comment

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

nvm I see this mimics the TextField.

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 605 passing tests on test run #6 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing605 Passing4 Skipped124m 11s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add'tl Approval Needed Waiting on another approval! DBaaS Relates to Database as a Service
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

7 participants