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

Upcoming: [DI-20844] - Tooltip for widget level filters and icons, beta feedbacks and CSS changes for CloudPulse #11062

Merged

Conversation

venkymano-akamai
Copy link
Contributor

@venkymano-akamai venkymano-akamai commented Oct 8, 2024

Description 📝

We have added Tooltip for all of our icons and widget level filters. Also addressed some of the beta demo feedbacks like
CamelCase for Aggregation Function dropdown label, Zeroth state of time duration and CSS updates for legend rows inside the widget.

Changes 🔄

  1. Added Tooltip for all icons and widget level filters
  2. CamelCase labels for Aggregation Function dropdown in widget
  3. Zero state update for time duration to move to Last 30 Minutes
  4. Padding and minHeight adjustment for legend rows inside widget
  5. Widget Unit scale up display logic update
  6. CloudpulseResourceSelection, publish the selected values only if the autocomplete closes since it is a multiselect component and reduce metrics call fired.
  7. Interval selection should default to AUTO if there are no preferences in its initial state

Target release date 🗓️

10-10-2024

Preview 📷

Before After
Screenshot 2024-10-08 at 3 54 12 PM Screenshot 2024-10-08 at 3 54 31 PM
Screenshot 2024-10-08 at 3 54 34 PM Screenshot 2024-10-08 at 3 54 36 PM
Screenshot 2024-10-08 at 3 54 48 PM Screenshot 2024-10-08 at 3 54 51 PM
Screenshot 2024-10-08 at 3 55 04 PM Screenshot 2024-10-08 at 3 55 22 PM
Screenshot 2024-10-08 at 7 00 20 PM Screenshot 2024-10-08 at 4 40 51 PM
Screenshot 2024-10-08 at 6 58 49 PM Screenshot 2024-10-08 at 3 26 54 PM

How to test 🧪

  1. Login as mock user as some endpoints are not ready
  2. Navigate to Monitor page
  3. Select dashboard and necessary filters to view the widgets
  4. You can see tooltips for icons and widget level filters
  5. Also you can see aggregate function dropdown displaying labels in camelcase
  6. Once you clear the selected dashboard time duration returns to Last 30 Minutes

As an Author I have considered 🤔

Check all that apply

  • 👀 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

@venkymano-akamai venkymano-akamai marked this pull request as ready for review October 8, 2024 12:29
@venkymano-akamai venkymano-akamai requested a review from a team as a code owner October 8, 2024 12:29
@venkymano-akamai venkymano-akamai requested review from mjac0bs and bnussman-akamai and removed request for a team October 8, 2024 12:29
@@ -140,6 +140,7 @@ export const CloudPulseWidget = (props: CloudPulseWidgetProperties) => {
widget: widgetProp,
} = props;
const flags = useFlags();
const scaledWidgetUnit = React.useRef(unit === 'Bytes' ? 'B' : unit);
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
const scaledWidgetUnit = React.useRef(unit === 'Bytes' ? 'B' : unit);
const scaledWidgetUnit = React.useRef(generateCurrentUnit(unit));

https://github.com/nikhagra-akamai/manager/blob/0bc9d73c4f351b6718061891cc6a9036ca4dff89/packages/manager/src/features/CloudPulse/Utils/unitConversion.ts#L222

@jaalah-akamai
Copy link
Contributor

This is looking better - just waiting on the tooltip update before approval

@venkymano-akamai
Copy link
Contributor Author

This is looking better - just waiting on the tooltip update before approval

@jaalah-akamai , we have moved to the common tooltip

@jaalah-akamai jaalah-akamai added the Add'tl Approval Needed Waiting on another approval! label Oct 15, 2024
Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Just a few small things then I will ✅

}}
autoHighlight
disableClearable
fullWidth={false}
Copy link
Member

Choose a reason for hiding this comment

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

I believe fullWidth defaults to false. It is probably unnecessary to explicitly specify it.

Suggested change
fullWidth={false}

Please try to avoid adding props unless they are necessary.

label="Select an Aggregate Function"
noMarginTop={true}
options={availableAggregateFunc}
sx={getAutocompleteWidgetStyles(theme)}
Copy link
Member

Choose a reason for hiding this comment

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

You can actually pass a function to sx. The theme will be passed automatically, so you can even remove the useTheme hook above

Suggested change
sx={getAutocompleteWidgetStyles(theme)}
sx={getAutocompleteWidgetStyles}

}}
autoHighlight
disableClearable
fullWidth={false}
Copy link
Member

Choose a reason for hiding this comment

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

Same feedback here. Is this nessesaery?

Comment on lines 139 to 140
_: React.SyntheticEvent,
selectedInterval: IntervalOptions
Copy link
Member

Choose a reason for hiding this comment

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

Now that the type-safety issue is fixed, please remove these explicit types. Allowing typescript to infer the types will be more type-safe

Comment on lines 131 to 132
option: IntervalOptions,
value: IntervalOptions
Copy link
Member

Choose a reason for hiding this comment

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

Same thing here. No need to explicitly put the types now that the type-safety is fixed

label="Select an Interval"
noMarginTop={true}
options={[autoIntervalOption, ...availableIntervalOptions]}
sx={getAutocompleteWidgetStyles(theme)}
Copy link
Member

Choose a reason for hiding this comment

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

Same thing here. sx can take a function. This will allow us to remove the useTheme call above

Suggested change
sx={getAutocompleteWidgetStyles(theme)}
sx={getAutocompleteWidgetStyles}

Copy link
Member

Choose a reason for hiding this comment

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

Should we keep this abstraction or just use Tooltip directly? cc @jaalah-akamai This seems fine, but I feel like one could argue is it an extra abstraction that would be nice to not need if possible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bnussman-akamai , thanks for the suggestion, I suggest we can keep this abstraction, so in future any CloudPulse specific changes can go in one tooltip component rather than doing it in all filters.

@venkymano-akamai
Copy link
Contributor Author

@bnussman-akamai , I have addressed the comments you have left. Please check once

@jaalah-akamai jaalah-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Oct 15, 2024
@jaalah-akamai
Copy link
Contributor

I had to re-run the CI E2E... when it passes, we'll merge

@venkymano-akamai
Copy link
Contributor Author

@jaalah-akamai , for this PR, in the same branch, in local if run yarn coverage:summary, yarn test, our ACLP cy, everything is passing. I don't know whats with the CI

@jaalah-akamai jaalah-akamai merged commit 4e7cb48 into linode:develop Oct 16, 2024
21 of 23 checks passed
Copy link

cypress bot commented Oct 16, 2024

Cloud Manager E2E    Run #6682

Run Properties:  status check failed Failed #6682  •  git commit 4e7cb48a4b: Upcoming: [DI-20844] - Tooltip for widget level filters and icons, beta feedback...
Project Cloud Manager E2E
Run status status check failed Failed #6682
Run duration 30m 31s
Commit git commit 4e7cb48a4b: Upcoming: [DI-20844] - Tooltip for widget level filters and icons, beta feedback...
Committer venkatmano-akamai
View all properties for this run ↗︎

Test results
Tests that failed  Failures 2
Tests that were flaky  Flaky 6
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 434

Tests for review

Failed  placementGroups/delete-placement-groups.spec.ts • 1 failed test

View Output Video

Test Artifacts
Placement Group deletion > can delete with Linodes assigned when unexpected error show up and retry Screenshots Video
Failed  oneClickApps/one-click-apps.spec.ts • 1 failed test

View Output Video

Test Artifacts
OneClick Apps (OCA) > Lists all the OneClick Apps Screenshots Video
Flakiness  linodes/clone-linode.spec.ts • 1 flaky test

View Output Video

Test Artifacts
clone linode > can clone a Linode from Linode details page Screenshots Video
Flakiness  objectStorageGen2/bucket-create-gen2.spec.ts • 3 flaky tests

View Output Video

Test Artifacts
Object Storage Gen2 create bucket tests > can create a bucket with E0 endpoint type Screenshots Video
Object Storage Gen2 create bucket tests > can create a bucket with E2 endpoint type Screenshots Video
Object Storage Gen2 create bucket tests > can create a bucket with E3 endpoint type Screenshots Video
Flakiness  linodes/rebuild-linode.spec.ts • 1 flaky test

View Output Video

Test Artifacts
rebuild linode > cannot rebuild a provisioning linode Screenshots Video
Flakiness  placementGroups/delete-placement-groups.spec.ts • 1 flaky test

View Output Video

Test Artifacts
Placement Group deletion > can unassign Linode when unexpected error show up and reopen the dialog Screenshots Video

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! CloudPulse Ready for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants