Skip to content

feat(changelog): add changelog widget version comparison#614

Open
vivekv1504 wants to merge 4 commits intowebex:nextfrom
vivekv1504:changelog-widget
Open

feat(changelog): add changelog widget version comparison#614
vivekv1504 wants to merge 4 commits intowebex:nextfrom
vivekv1504:changelog-widget

Conversation

@vivekv1504
Copy link

@vivekv1504 vivekv1504 commented Feb 6, 2026

COMPLETES #https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-770576

This pull request addresses

ADD VERSION COMAPRISON MODE FUNCTIONALITY IN WIDGETS

by making the following changes

Version Comparison Mode
Compare all packages between two stable versions
Package-level comparison with pre-release version support
Visual status indicators (Unchanged, Changed, Added, Removed)
Statistics dashboard (total packages, changed count, etc.)
Copy comparison link for sharing

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • The testing is done with the amplify link
    < ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - cursor
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document
  • [] I have tested the functionality with amplify link

Make sure to have followed the contributing guidelines before submitting.

@aws-amplify-us-east-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-614.d1b38q61t1z947.amplifyapp.com

@rarajes2 rarajes2 added the validated Indicates that the PR is ready for actions label Feb 17, 2026
@vivekv1504 vivekv1504 changed the title feat(changelog):add changelog widget version comaprison feat(changelog): add changelog widget version comparison Feb 17, 2026
Copy link
Contributor

@rarajes2 rarajes2 left a comment

Choose a reason for hiding this comment

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

Let's move all the business logic to a separate file comparison-view.js and import the methods in this file and use it. We can keep all the UI related methods in this file.

</li>
<li>
<a href="?compareStableA=1.28.0&compareStableB=1.28.2&comparePackage=@webex/widgets&compareVersionA=1.28.2-next.2&compareVersionB=1.28.2-next.3"
>Package-level comparison - @webex/widgets specific versions</a
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: please align the angular brackets


/* Comparison Results Table */
#comparison-results .table-wrapper {
max-height: 500px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use rem where recommended

Comment on lines -25 to +56
Handlebars.registerHelper('forIn', function (object) {
let returnArray = [];
for (let prop in object) {
returnArray.push({key: prop, value: object[prop]});
}
return returnArray;
Handlebars.registerHelper("forIn", function(object) {
let returnArray = [];
for(let prop in object){
returnArray.push({key: prop, value: object[prop]});
}
return returnArray;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's revert all these formatting changes, it will reduce the diff. Applicable everywhere

Comment on lines +107 to +108
if (searchParams.package) {
if (!packageNameInputDropdown.disabled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

These can be clubbed

versionPaths[version] = path;
optionsHtml += `<option value="${version}">${version}</option>`;
const populatePackageNames = (changelog) => {
let specialPackages = ['@webex/widgets', '@webex/cc-widgets'];
Copy link
Contributor

Choose a reason for hiding this comment

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

What are special packages ? Why they need to be treated differently from other packages ?

Copy link
Author

Choose a reason for hiding this comment

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

this is in single search comparison that is written by old as format in sdk comparison and that special pacakges are shows separately while populated the pacages names ,that pacakages are popular or everywhere presented in stable. versions

Comment on lines +1417 to +1418
console.log('effectiveVersionA:', effectiveVersionA, '(requested:', versionASpecific, ')');
console.log('effectiveVersionB:', effectiveVersionB, '(requested:', versionBSpecific, ')');
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove all console logs

Comment on lines +1609 to +1613
if (comparisonPackageSelect) comparisonPackageSelect.value = '';
if (versionAPrereleaseSelect) versionAPrereleaseSelect.value = '';
if (versionBPrereleaseSelect) versionBPrereleaseSelect.value = '';
if (comparisonPackageRow) comparisonPackageRow.style.display = 'none';
if (prereleaseRow) prereleaseRow.style.display = 'none';
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to have the conditions ? We can reset the values irrespective of the conditions, right ?

Comment on lines +1754 to +1759
if (searchForm) searchForm.classList.remove('hide');
if (comparisonForm) comparisonForm.classList.add('hide');
if (comparisonResults) comparisonResults.classList.add('hide');
if (searchResults) searchResults.classList.remove('hide');
if (helperSection) helperSection.classList.remove('hide');
if (comparisonHelper) comparisonHelper.classList.add('hide');
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, see if we actually need the if conditions ?

Check this logic everywhere in this file


const stableA = versionASelect.value;
const stableB = versionBSelect.value;
const selectedPackage = comparisonPackageSelect ? comparisonPackageSelect.value : null;
Copy link
Contributor

Choose a reason for hiding this comment

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

const selectedPackage = comparisonPackageSelect?.value;

We can keep the logic like this and utilize the undefined value

Comment on lines +1872 to +1873
if (versionAPrereleaseSelect) versionAPrereleaseSelect.addEventListener('change', updateCompareButtonState);
if (versionBPrereleaseSelect) versionBPrereleaseSelect.addEventListener('change', updateCompareButtonState);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have any logic to remove the event listeners when we switch to another mode? We should not be adding multiple listeners as we toggle through the single and comparison views.

Applicable everywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated Indicates that the PR is ready for actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants