feat: update changelog widget UI styles and logic#652
feat: update changelog widget UI styles and logic#652Jahnavi314 wants to merge 1 commit intowebex:nextfrom
Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84c077faf9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!selectedPackage) { | ||
| alert('Please select a package'); | ||
| return false; | ||
| } | ||
| if (!stableA || !stableB) { | ||
| alert('Please select both stable versions'); | ||
| alert('Please select both base and target stable versions'); | ||
| return false; | ||
| } | ||
|
|
||
| if (selectedPackage && !versionASpecific && !versionBSpecific) { | ||
| alert('Please select at least one pre-release version, or leave package empty for full version comparison'); | ||
| if (!versionASpecific || !versionBSpecific) { | ||
| alert('Please select pre-release (or stable) for both base and target'); | ||
| return false; |
There was a problem hiding this comment.
Re-enable full stable-version comparison submissions
This validation now hard-requires a package and both pre-release selectors, and handleComparisonSubmit no longer has the fallback path to performVersionComparison, so the UI can no longer run a full versionA vs versionB comparison from the form (only package-level comparisons are possible). That is a functional regression from the previous behavior and from the helper text in this page, where users are told they can compare full stable versions directly.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
We are intentionally limiting this form to package-level comparison only. Full version-vs-version comparison is out of scope here and is handled at pre-release. We’re not re-enabling the full stable-version comparison path
| const fetchMergedChangelogPackages = async () => { | ||
| const paths = Object.values(versionPaths); | ||
| if (paths.length === 0) return {}; | ||
| const results = await Promise.all(paths.map((p) => fetch(p).then((r) => r.json()).catch(() => ({})))); |
There was a problem hiding this comment.
Limit comparison package options to selected stable versions
The package dropdown is now built by merging package names across all version files, before a specific base/target version pair is chosen. This allows selecting packages that may not exist in the chosen stableA/stableB changelogs, which later causes package comparison to fail with Could not find version data once submit reaches generatePackageComparisonData. The previous flow populated packages from the selected versions’ union, which avoided presenting invalid choices.
Useful? React with 👍 / 👎.
rarajes2
left a comment
There was a problem hiding this comment.
Let's create a test plan for the ChangeLog and verify the added functionality against them. We are going back and forth multiple times and seeing the broken functionality.
We should only proceed with the PR review process one the functionality is working as expected.
| padding: 1.25rem; /* 20px */ | ||
| padding: 1.25rem; | ||
| /* 20px */ | ||
| margin: 0; | ||
| text-align: left; /* Align the title text to the left */ | ||
| text-align: left; | ||
| /* Align the title text to the left */ | ||
| box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); | ||
| font-size: 1.5rem; | ||
| z-index: 1000; /* Ensure the header is above other content */ | ||
| z-index: 1000; | ||
| /* Ensure the header is above other content */ | ||
| } |
There was a problem hiding this comment.
There are so many formatting diffs in the file. Please check the whole diff in this file and revert them, it will reduce the diff.
| #comparison-form-column select { | ||
| position: relative; | ||
| z-index: 10; | ||
| } | ||
|
|
||
| #comparison-form-column select:focus { | ||
| z-index: 11; | ||
| } |
There was a problem hiding this comment.
We should avoid using the z-index unless there is no other way. Please confirm if this is required, if yes, why it's required ?
| border: 1px solid #ccc; | ||
| background-color: #f5f5f5; | ||
| color: var(--color-danger); |
There was a problem hiding this comment.
We are using vars as well as hard coded colors. Let's keep them consistent. We should be using vars only.
| font-size: 1.2em; | ||
| color: #333; | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
It's recommended to have a newline at the end of the file
| keys.sort((a, b) => { | ||
| const pa = a.split('.').map(Number); | ||
| const pb = b.split('.').map(Number); | ||
| for (let i = 0; i < Math.max(pa.length, pb.length); i++) { |
There was a problem hiding this comment.
We can keep the variable names readable
| */ | ||
| const populateComparisonPackagesFromChangelog = (changelog) => { | ||
| if (!comparisonPackageSelect) return; | ||
| const specialPackagesAlways = ['@webex/widgets', '@webex/cc-widgets']; |
There was a problem hiding this comment.
I think we should use some other name than specialPackages. It does not reflect what it actually mean
| <script type="module" src="assets/js/app.js"></script> | ||
| </body> | ||
|
|
||
| </html> No newline at end of file |
There was a problem hiding this comment.
Same here. Newline can be added.
COMPLETES https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-784886
This pull request addresses
The need for a clearer and more user-friendly changelog interface for the widgets project.
The existing implementation required UI improvements to better visualize changelog data and version comparison information.
by making the following changes
-Updated the changelog widget UI layout
-Improved styling and structure
-Improved readability and presentation of changelog information
-Enhanced the display of version-related changelog data
Change Type
The following scenarios were tested
https://app.vidcast.io/share/6aace747-632b-492e-94b6-dd6cb4d5eea3
The GAI Coding Policy And Copyright Annotation Best Practices
I certified that