Skip to content

upcoming: [DI-20501] - Fix Demo feedbacks and missed changes across ACLP#10851

Merged
jaalah-akamai merged 25 commits intolinode:developfrom
venkymano-akamai:feedbacks_bug_fix
Sep 3, 2024
Merged

upcoming: [DI-20501] - Fix Demo feedbacks and missed changes across ACLP#10851
jaalah-akamai merged 25 commits intolinode:developfrom
venkymano-akamai:feedbacks_bug_fix

Conversation

@venkymano-akamai
Copy link
Contributor

@venkymano-akamai venkymano-akamai commented Aug 29, 2024

Description 📝

Fixed demo feedbacks and missed changes across ACLP

Changes 🔄

  1. Fixed Dashboard Select placeholder from Select a Dashboard to Select Dashboard
  2. Fixed striking functionality interchangeably while clicking native legend as well as legend table row.
  3. Enhanced Region Selection component to honor the placeholder prop being passed.
  4. Pass fill option to line graph only if the chart type is area.
  5. Pass queried resource option for choosing default selections as well on the CloudPulseCustomSelect component
  6. Integrate manual refresh functionality
  7. Fix color for close icon in the CloudPulseResourcesSelection component
  8. Update labels in time duration from Past to Last

Target release date 🗓️

02-09-2024

Preview 📷

Include a screenshot or screen recording of the change

💡 Use <video src="" /> tag when including recordings in table.

Before After
Screenshot 2024-08-29 at 1 15 12 PM Screenshot 2024-08-29 at 1 20 09 PM
Screenshot 2024-08-29 at 1 16 12 PM Screenshot 2024-08-29 at 1 20 27 PM
Screenshot 2024-08-29 at 1 17 07 PM Screenshot 2024-08-29 at 1 21 09 PM
Screenshot 2024-08-29 at 1 18 22 PM Screenshot 2024-08-29 at 1 20 48 PM
Screenshot 2024-08-29 at 1 19 01 PM Screenshot 2024-08-29 at 1 21 31 PM

How to test 🧪

  1. Enable mock service as some API endpoints are not available.
  2. Click on the Monitor tab
  3. You will be able to see the options and fixes
  4. For global manual refresh, once you see the widgets rendered, click the refresh icon, you can see again the widgets are loaded.

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 requested a review from a team as a code owner August 29, 2024 07:56
@venkymano-akamai venkymano-akamai requested review from AzureLatte and jdamore-linode and removed request for a team August 29, 2024 07:56
display: _nativeLegend,
onClick: (e, legendItem) => {
if (legendItem) {
handleLegendClick(legendItem.datasetIndex!);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI, this will strikeout the legend as well on nativelegend click

const dimension = {
backgroundColor: color,
borderColor: '',
borderColor: color,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI - pass border color for graphs

borderColor: '',
borderColor: color,
data: seriesDataFormatter(transformedData.values, start, end),
fill: widgetChartType === 'area' ? true : false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI - pass fill based on chart type

display: _nativeLegend,
onClick: (_e, legendItem) => {
if (legendItem && legendItem.datasetIndex) {
handleLegendClick(legendItem.datasetIndex); // when we click on native legend, also call the handle legend click function
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI - Even on clicking the native legend, make use of handle legend click functionality


if (label === PAST_7_DAYS) {
return { unit: 'day', value: 7 };
return { unit: 'days', value: 7 };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The metrics API understands days instead of day going forward

@venkymano-akamai venkymano-akamai changed the title upcoming: [DI-20501] - Fix Demo feedbacks and small bugs across ACLP upcoming: [DI-20501] - Fix Demo feedbacks and missed changes across ACLP Aug 29, 2024
borderColor: '',
borderColor: color,
data: seriesDataFormatter(transformedData.values, start, end),
fill: widgetChartType === 'area' ? true : false,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
fill: widgetChartType === 'area' ? true : false,
fill: widgetChartType === 'area',

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 , fixed this comment, please check if it is good now

? options
: queriedResources
? queriedResources
: [],
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Would options || queriedResources || [] give us the same here?

Copy link
Contributor Author

@venkymano-akamai venkymano-akamai Aug 30, 2024

Choose a reason for hiding this comment

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

Yes, this will work as well, thanks for the simplification point, have addressed this. Please check if it is good now

@github-actions
Copy link

github-actions bot commented Aug 30, 2024

Coverage Report:
Base Coverage: 86.15%
Current Coverage: 86.14%

Comment on lines +253 to +254
subtitle={subtitle}
title=""
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the subtitle be made the title instead?

Note: leaving the title blank affects accessibility - when I tested using voiceover on placeholders, the title gets read but the subtitle doesn't

Comment on lines +316 to +318
resources.find((resourceObj) => String(resourceObj.id) === id)?.label ??
id ??
''
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: for readability, we could switch to having

const resource = resources.find((resourceObj) => String(resourceObj.id) === id);
(could name the const resourceObj instead)

outside of the return statement, and then here, just have

return resource?.label ?? id ?? '';

@venkymano-akamai
Copy link
Contributor Author

venkymano-akamai commented Sep 3, 2024

@coliu-akamai , can you please check if it is good now

@bnussman-akamai , @jaalah-akamai feel free to look if it is good

@coliu-akamai
Copy link
Contributor

coliu-akamai commented Sep 3, 2024

This could just be a me problem, but I'm getting an error when trying to render all the graphs:
image

I have the CloudPulse flag and the MSW on - is there anything else I need to do?

confirmed fix asynchronously!

Copy link
Contributor

@jaalah-akamai jaalah-akamai left a comment

Choose a reason for hiding this comment

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

Thanks for making changes

@jaalah-akamai jaalah-akamai added the Add'tl Approval Needed Waiting on another approval! label Sep 3, 2024
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.

✅ Fixed Dashboard Select placeholder from Select a Dashboard to Select Dashboard
✅ Fixed striking functionality interchangeably while clicking native legend as well as legend table row.
✅ Enhanced Region Selection component to honor the placeholder prop being passed.
✅ Integrate manual refresh functionality
✅ Fix color for close icon in the CloudPulseResourcesSelection component
✅ Update labels in time duration from Past to Last

Quick note for global refresh - seems like part of the title flickers. I'm unsure if this is an issue or not/or if it's already known, but here's the video in case:

Screen.Recording.2024-09-03.at.1.23.49.PM.mov

Had a couple of other minor nitpicky comments below, but they're non-blocking. Thanks for the changes!

<CloudPulseLineGraph
error={
status === 'error'
status === 'error' && error?.[0]?.reason !== jweTokenExpiryError // show the error only if the error is not related to token expiration
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: now that error?.[0]?.reason is being used several times here and at lines 356, we could move it to a constant for better readability. Somewhere above, we could have something like const metricsError = error?.[0]?.reason; and then use metricsError here (potentially use a different name that better encompasses what the error is for)

legend: {
display: _nativeLegend,
onClick: (_e, legendItem) => {
if (legendItem && legendItem.datasetIndex!==undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we put spaces around the !==
(eslint complains otherwise)

@coliu-akamai coliu-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Sep 3, 2024
@venkymano-akamai
Copy link
Contributor Author

@coliu-akamai , Thanks for the approval, i have fixed those minors. Also the flickering is due to preferences, for which we have a separate PR that is also under review

@jaalah-akamai jaalah-akamai merged commit f787b09 into linode:develop Sep 3, 2024
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! Cloud Pulse

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants