Skip to content

upcoming: [DPS-33118] - Add stream summary#12451

Merged
jaalah-akamai merged 1 commit intolinode:developfrom
kagora-akamai:feature/DPS-33118-add-stream-summary
Jul 3, 2025
Merged

upcoming: [DPS-33118] - Add stream summary#12451
jaalah-akamai merged 1 commit intolinode:developfrom
kagora-akamai:feature/DPS-33118-add-stream-summary

Conversation

@kagora-akamai
Copy link
Contributor

@kagora-akamai kagora-akamai commented Jul 1, 2025

Description 📝

DataStream: Stream Summary checkout bar

Changes 🔄

  • Delivery summary block
  • Fake price update on form values change (excluding Name and Destination Name fields)

Target release date 🗓️

July 2025

Preview 📷

Before After
before after 1
after 2

How to test 🧪

Prerequisites

  • navigate to datastream/streams
  • click on the Create Stream button in datastream/streams
  • change form field values and observe price value change in Stream Summery section
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
📱 Providing mobile 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

@kagora-akamai kagora-akamai force-pushed the feature/DPS-33118-add-stream-summary branch from fe9a0f9 to 08b4610 Compare July 1, 2025 12:57
@kagora-akamai kagora-akamai force-pushed the feature/DPS-33118-add-stream-summary branch from 08b4610 to 75a4825 Compare July 2, 2025 09:51
@kagora-akamai kagora-akamai marked this pull request as ready for review July 2, 2025 09:54
@kagora-akamai kagora-akamai requested a review from a team as a code owner July 2, 2025 09:54
@kagora-akamai kagora-akamai requested review from bnussman-akamai and cpathipa and removed request for a team July 2, 2025 09:54
Comment on lines 19 to 29
React.useEffect(() => {
const ignoreFormFields = ['label', 'destination_label'];

const { unsubscribe } = watch((_, { name }) => {
if (!ignoreFormFields.includes(name as string)) {
// eslint-disable-next-line sonarjs/pseudo-random
setPrice(Math.random() * 100);
}
});
return () => unsubscribe();
}, [watch]);
Copy link
Member

Choose a reason for hiding this comment

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

nit (not-blocking): From my understanding, watch will cause the entire from to re-render. Might not be an issue, just something to watch out for

I know this code is not final, but here's what this code could look like in the future:

  const { control } = useFormContext<CreateStreamForm>();

  const [destinationType] = useWatch({ control, name: ['destination_type'] });

  const price = getPrice(destinationType)
  • We can use useWatch over watch to keep re-renders isolated to this component
  • We can eliminate the price state and just use a const that derives the price from watched form values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank You, I checked the watch vs useWatch case. You are right. It looks better now. I adapted the changes so it will not get lost in the future.

Comment on lines 8 to 9
fontSize: '16px',
lineHeight: '22px',
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 use design tokens here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, thank You. I changed it to use theme.tokens.

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Jul 2, 2025
@kagora-akamai kagora-akamai force-pushed the feature/DPS-33118-add-stream-summary branch from 75a4825 to 0b0a205 Compare July 3, 2025 10:03
@kagora-akamai kagora-akamai force-pushed the feature/DPS-33118-add-stream-summary branch from 0b0a205 to e442d4d Compare July 3, 2025 12:53
@jaalah-akamai jaalah-akamai added DataStream Approved Multiple approvals and ready to merge! labels Jul 3, 2025
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 1 failing test on test run #5 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
1 Failing670 Passing4 Skipped128m 10s

Details

Failing Tests
SpecTest
lke-create.spec.tsCloud Manager Cypress Tests→LKE Cluster Creation with LKE-E→shows the LKE-E flow with the feature flag on » LKE Cluster Creation with LKE-E→shows the LKE-E flow with the feature flag on

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/kubernetes/lke-create.spec.ts"

@jaalah-akamai jaalah-akamai merged commit dc1f9b8 into linode:develop Jul 3, 2025
34 of 35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Jul 3, 2025
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! Logs

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants