Skip to content

Conversation

@JeanMarcMilletScality
Copy link
Contributor

@JeanMarcMilletScality JeanMarcMilletScality commented Oct 15, 2025

Restructure charts components
Edit utils fn to share logic between charts when possible

Remove Vega

⚠️ This PR remove Vega file and move a lot of files and could break imports

@bert-e
Copy link
Contributor

bert-e commented Oct 15, 2025

Hello jeanmarcmilletscality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Oct 15, 2025

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@bert-e
Copy link
Contributor

bert-e commented Oct 17, 2025

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@JeanMarcMilletScality JeanMarcMilletScality marked this pull request as ready for review October 17, 2025 14:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR restructures the chart components by consolidating them into a unified charts folder, removing the deprecated Vega library, and sharing common logic between chart implementations.

Key Changes:

  • Removed Vega dependencies (vega, vega-embed, vega-lite, vega-tooltip) and all Vega-based chart implementations
  • Consolidated all chart components into src/lib/components/charts/ with shared utilities
  • Created chartUtils.ts to share logic between Barchart and LineTimeSerieChart (unit normalization, tick generation, date formatting)

Reviewed Changes

Copilot reviewed 48 out of 54 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
package.json Removed Vega library dependencies
src/lib/next.ts Updated exports to use consolidated charts folder
src/lib/index.ts Commented out deprecated chart exports
src/lib/components/charts/ New consolidated charts structure with shared utilities
src/lib/components/charts/common/chartUtils.ts Shared utility functions for unit conversion, tick generation, and date formatting
stories/ Updated imports and removed deprecated story files

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

export const maxWidthTooltip = { maxWidth: '20rem' };

/* -------------------------------------------------------------------------- */
/* utils functions */
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'utils functions' to 'utility functions'.

Suggested change
/* utils functions */
/* utility functions */

Copilot uses AI. Check for mistakes.
* For 'date' format, return YYYY-MM-DD format if time range is greater than 1 year, otherwise return MM-DD format
* Formats timestamp for X-axis labels based on duration
*
*
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

[nitpick] Extra blank line in JSDoc comment. Remove one of the consecutive blank lines for consistency.

Suggested change
*

Copilot uses AI. Check for mistakes.
Comment on lines 58 to 59
const numberOfTicks =
possibleTickNumbers.find((number) => topValue % (number - 1) === 0) || 2; // Default to 2 ticks if no match
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

[nitpick] The fallback value of 2 ticks seems arbitrary. Consider documenting why 2 is chosen as the default, or verify this produces reasonable tick spacing for edge cases where no modulo match is found.

Suggested change
const numberOfTicks =
possibleTickNumbers.find((number) => topValue % (number - 1) === 0) || 2; // Default to 2 ticks if no match
// If no modulo match is found, default to 4 ticks for better chart readability.
// This ensures at least start, end, and two intermediate ticks are present.
const numberOfTicks =
possibleTickNumbers.find((number) => topValue % (number - 1) === 0) || 4;

Copilot uses AI. Check for mistakes.
@bert-e
Copy link
Contributor

bert-e commented Nov 20, 2025

Conflict

There is a conflict between your branch improvement/charts-restructuration and the
destination branch development/1.0.

Please resolve the conflict on the feature branch (improvement/charts-restructuration).

git fetch && \
git checkout origin/improvement/charts-restructuration && \
git merge origin/development/1.0

Resolve merge conflicts and commit

git push origin HEAD:improvement/charts-restructuration

JeanMarcMilletScality and others added 11 commits November 20, 2025 13:34
Remove Vega
Update core-ui (remove vega deps)
- Introduced `normalizeChartDataWithUnits` for consistent data normalization across Barchart and LineTimeSerieChart.
- Updated `formatDate` to `formatXAxisDate` for clarified usage
- Added `getTooltipDateFormat` for tooltip date formatting.
- Cleaned up imports and removed unused functions in Barchart utilities.
- Enhanced type definitions and documentation for better clarity.
- Updated tests to cover new functionalities and ensure accuracy.
Return undefined for label if no unitRange
@JeanMarcMilletScality JeanMarcMilletScality force-pushed the improvement/charts-restructuration branch from d336dc5 to 5872b07 Compare November 20, 2025 12:41
@bert-e
Copy link
Contributor

bert-e commented Nov 20, 2025

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 48 out of 54 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@ChengYanJin ChengYanJin left a comment

Choose a reason for hiding this comment

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

LGTM !!

@bert-e
Copy link
Contributor

bert-e commented Nov 28, 2025

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@JeanMarcMilletScality
Copy link
Contributor Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Nov 28, 2025

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/1.0

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented Nov 28, 2025

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/1.0

Please check the status of the associated issue None.

Goodbye jeanmarcmilletscality.

@bert-e bert-e merged commit 9f56d6d into development/1.0 Nov 28, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants