-
Notifications
You must be signed in to change notification settings - Fork 332
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
feat: [M3-7789] β Disable 512GB plans #10228
feat: [M3-7789] β Disable 512GB plans #10228
Conversation
β¦nstead of constants.ts; small introduction for shifting to Limited Availability instead of Sold Out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not specific to the changes in this PR, but the pattern of adding a tooltip to the chip in a disabled plan row (or card, on small screens) doesn't work on touch devices, because the chip cannot be interacted with and therefore the tooltip cannot be displayed: IMG_2667.mp4Less crucially, it looks like passing a React node, rather than a string, to the I don't think there are any accessibility implications here since as far as I can tell there's no way to actually interact with these disabled plan rows in a way that would cause the ARIA label to be announced, but wanted to call it out in case somebody with more knowledge than me has a better understanding of the implications. (Edit: still planning to follow up with some test additions soon) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality LGTM!, except for the small screen 'LA' chip issue. I've left a few comments for improvements.
- - Verified Linode create flow for Dedicated/Premium CPUs
- - Verified Kubernetes create flow for Dedicated/Premium CPUs
- - Verified Databases create flow for Dedicated CPUs
@@ -72,7 +72,7 @@ export const KubernetesPlanContainer = ( | |||
disabled={disabled} | |||
getTypeCount={getTypeCount} | |||
idx={id} | |||
isPlanSoldOut={disabled ? false : isPlanSoldOut} // no need to add sold out chip if the whole panel is disabled (meaning that the plan isn't available for the selected region) | |||
isPlanSoldOut={disabled ? false : isPlanSoldOut} // no need to add "Sold Out" chip if the whole panel is disabled (meaning that the plan isn't available for the selected region) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason why we are not showing "Sold out" chip when entire plans panel is disabled ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are DCs where plans are not available and that's sufficient from a product perspective. In other words, you can't sell out of plans that aren't available.
packages/manager/src/features/Kubernetes/KubernetesPlansPanel/KubernetesPlanSelection.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesPlansPanel/KubernetesPlanSelection.tsx
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesPlansPanel/KubernetesPlanSelection.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesPlansPanel/KubernetesPlanSelection.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesPlansPanel/KubernetesPlanSelection.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/components/PlansPanel/PlanContainer.tsx
Outdated
Show resolved
Hide resolved
@jaalah-akamai Pushed a handful of unit tests to confirm that the 512 GB plan selections get disabled -- there's room for more coverage (confirming other plans don't get disabled, confirming it works for "Premium" 512 GB plans in addition to "Dedicated" and that the tooltip message reflects that, Cypress coverage, etc.) and I may work on that some tomorrow, but hoping this helps out some in the meantime |
Coverage Report: β
|
|
@carrillo-erik @cpathipa Unfortunately we had some shifting product decisions today that will solve or make most of these irrelevant. I'm going to move this back into WIP, and any reviews that are still relevant I'll tag you all in. In addition, disabled states don't need to meet color contrast ratios... but it doesn't mean we shouldn't address it. We can tackle that in a separate ticket if need be. @jdamore-linode Good call, I have a solution in mind for that. |
I'm still having a hard time with the tooltip on touch devices -- I can get it to appear now, but I can't get it to appear consistently. And when it does appear, it sometimes stays indefinitely, and other times seemingly dismisses itself after a second or so: IMG_2730.mp4 |
Thanks for checking that @jdamore-linode. Is this something you're only seeing in this section of the app or is it a more general issue with tooltips in the app? I'm also seeing that |
@dwiley-akamai Other tooltips appear to be working fine*, it looks like it's specific to the tooltip inside the 512 GB plan row. *(I am seeing a little bit of weirdness with other tooltips where sometimes tapping the icon reveals the tooltip without the icon turning blue, but I'm seeing that in Prod too so definitely not related to this PR)
It seems as though the This seems to be the cause for most of the test failures, although the |
I'm experiencing an issue with the tooltip in mobile view. The tooltip text is not showing in the create Linode flow or the create LKE flow. I tried to activate the tooltip and I can see it change colors upon clicking it, however, the text does not display. Please look at screen recording below. Screen.Recording.2024-03-13.at.2.02.07.PM.mov |
import type { PlanSelectionType } from './types'; | ||
import type { ExtendedType } from 'src/utilities/extendType'; | ||
|
||
export const LIMITED_AVAILABILITY_TEXT = 'This plan has limited availability.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we usually have a delimiter on these type of strings? I think this should be This-plan-has-limited-availability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe so, is there an example in the codebase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I confused this with how we set the data-testid
strings. Those we use a delimiter.
interface TooltipDataAttribute extends TooltipProps { | ||
['data-qa-tooltip']: string | undefined; | ||
title: React.ReactNode; | ||
} | ||
|
||
interface TooltipNonDataAttribute extends TooltipProps { | ||
title: string; | ||
} | ||
|
||
// Discriminated union to enforce `data-qa-tooltip` if title is a ReactNode | ||
export type EnhancedTooltipProps = | ||
| TooltipDataAttribute | ||
| TooltipNonDataAttribute; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need all of this?
In my opinion, I don't think we should be enforcing that Toolips have data-qa-tooltip
under any circumstance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree -- I get how this came about, but the data-qa-*
and data-testid
attributes should be inconsequential to the app itself (i.e. in an ideal world we should be able to remove all of these attributes throughout the app without it causing any build issues or changes in behavior to the app itself)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may break some tests. However title
should almost always be a string now since we determined ReactNode
(which was used for links) was inaccessible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaalah-akamai Locally I undid these and the related dataAttrs
changes throughout the diff, the currently failing E2E tests pass aside from lke-update.spec.ts
(possibly unrelated) and there are no TS errors. Would it be objectionable to reintroduce the discriminated union and associated changes as part of a separate ticket?
edit: as agreed upon in Standup, I'll undo these changes and create a separate ticket for looking into reintroducing them
edit 2: created M3-7882
@@ -72,7 +72,7 @@ export const MaintenanceTableRow = (props: AccountMaintenance) => { | |||
<Hidden lgDown> | |||
<TableCell> | |||
{isTruncated ? ( | |||
<Tooltip title={<HighlightedMarkdown textOrMarkdown={reason} />}> | |||
<Tooltip title={reason}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be reverted?
@dwiley-akamai we also need to fix the treatment of this banner, it's inconsistent with others:
|
We're matching the approved UX wireframes on this, but I will double-check with Lauren on these two points edit: confirmed that this banner should match the existing ones, commit with changes forthcoming |
@jdamore-linode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the video of the run, the test was failing because the Dedicated tab consisted of just the disabled 512 GB plan, so this code brings the test to the Shared CPU tab instead so it could proceed as it typically does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality is looking good so far. Going to keep reviewing! UX feedback: I think the |
This is something the team is aware of and will follow up in a future release if they feel it needs to be changed - thanks for the feedback though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving pending as a follow up
- improvement of the tooltip accessibility/behavior for cards
- Improved coverage (e2e & new units)
- naming conventions (
mostClassPlansAreLimitedAvailability
,isMajorityLimitedAvailabilityPlans
types
&_types
,plans
&_plans
,plansForThisLinodeTypeClass
&_plansForThisLinodeTypeClass
etc)
Also the reasoning behind making the banner dismissible is dubious, not to mention inconsistent with other banners in the plan panel
Description π
We are temporarily disabling the 512 GB plans for both Dedicated CPU and Premium CPU plan types. This approach aims to direct users towards accessible offerings and ensure clarity in our plan options. To achieve this, we introduce a "placeholder" 512 GB entry in the Linode plans table. This entry is visually distinct (greyed out).
We are also moving away from the "Sold Out" chip in favor of a tooltip informing the user of limited availability + a dismissible banner with a docs link the user can navigate to in order to learn more about plans and availability.
Changes π
Target release date ποΈ
03/18/2024
Preview π·
Edit: 3/14/24 revised styling of dismissible availability banner
Bold text and reduced padding around the notice to better align with existing noticesLinode Create
Dedicated tab:
Premium and GPU tabs:
If Premium/GPU plans are not supported in the selected region...
If Premium/GPU plans are supported in the selected region...
and half or less of the plans are unavailable...
and more than half of the plans are unavailable... (notice the slight change in wording in the dismissible banner, and the lack of help icons in the table)
Tabs in Linode Resize, LKE Create, and LKE "Add a Node Pool" drawer should match what you see for Linode Create (given the same region is selected). The Dedicated tab for Database Create should also match up.
The docs link in the dismissible banner should correspond to the plan tab (Dedicated tab --> Dedicated docs link, etc.).
How to test π§ͺ
Prerequisites
Verification steps for disabled 512 GB plans
As an Author I have considered π€