Skip to content

Conversation

@HansAlainNyaba
Copy link
Member

@HansAlainNyaba HansAlainNyaba commented Nov 24, 2025

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

  • 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 not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Add the URL for your deploy!
https://hansalainnyaba.github.io/geoview/demos-navigator.html?config=./configs/navigator/demos/17-package-custom-legend.json

Checklist:

  • I have build (rush build) and deploy (rush host) my PR
  • I have connected the issues(s) to this PR
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have created new issue(s) related to the outcome of this PR is needed
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

This change is Reviewable

Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

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

@jolevesq reviewed 5 of 7 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @HansAlainNyaba)


packages/geoview-custom-legend/src/custom-legend-style.ts line 9 at r2 (raw file):

 * @returns {SxClasses} An object containing the style classes
 */
export const getSxClassesMain = (): SxClasses => ({

Same comment as above


packages/geoview-custom-legend/src/custom-legend.tsx line 28 at r2 (raw file):

  const { cgpv } = window as TypeWindow;
  const { ui, reactUtilities } = cgpv;
  const { useState } = reactUtilities.react;

Why are you using useState?


packages/geoview-custom-legend/src/custom-legend.tsx line 33 at r2 (raw file):

  const theme = ui.useTheme();
  const sxClasses = getSxClasses(theme);
  const legendSxMain = getSxClassesMain();

Regroup all scClasses in one


packages/geoview-custom-legend/tsconfig.json line 10 at r2 (raw file):

  },
  "include": ["src"],
  "references": [{ "path": "../geoview-core" }]

Bring bac spaces


packages/geoview-custom-legend/schema.json line 29 at r2 (raw file):

  },
  "definitions": {
    "legendItem": {

Looks like we miss some properties fromt he RAMP custom legend config


packages/geoview-custom-legend/src/index.tsx line 65 at r2 (raw file):

    return {
      id: `custom-legend`,
      tooltip: 'CustomLegend.title',

we need to provide aria-label, if not the same you can add tooltip

Copy link
Member Author

@HansAlainNyaba HansAlainNyaba left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 9 files reviewed, 6 unresolved discussions (waiting on @jolevesq)


packages/geoview-custom-legend/schema.json line 29 at r2 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Looks like we miss some properties fromt he RAMP custom legend config

Done.


packages/geoview-custom-legend/src/custom-legend.tsx line 28 at r2 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Why are you using useState?

Done.

Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

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

@jolevesq reviewed 2 of 4 files at r3, all commit messages.
Reviewable status: 7 of 9 files reviewed, 6 unresolved discussions (waiting on @HansAlainNyaba)


packages/geoview-custom-legend/schema.json line 108 at r3 (raw file):

            "description": "ID of the layer this legend item is associated with (if any)"
          },
          "filter": {

What is this?

@HansAlainNyaba
Copy link
Member Author

packages/geoview-custom-legend/schema.json line 29 at r2 (raw file):

Previously, HansAlainNyaba (Hans A ) wrote…

Done.

I added most of them we now have ENTRY, ENTRY GROUP, INFO SECTION, UNBOUND LAYER and VISIBILITY SET in the schema

Copy link
Member Author

@HansAlainNyaba HansAlainNyaba left a comment

Choose a reason for hiding this comment

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

@HansAlainNyaba made 4 comments.
Reviewable status: 3 of 9 files reviewed, 6 unresolved discussions (waiting on @jolevesq).


packages/geoview-custom-legend/schema.json line 108 at r3 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

What is this?

I removed the filter property


packages/geoview-custom-legend/src/custom-legend.tsx line 33 at r2 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Regroup all scClasses in one

Done.


packages/geoview-custom-legend/src/custom-legend-style.ts line 9 at r2 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Same comment as above

Done.


packages/geoview-custom-legend/src/index.tsx line 65 at r2 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

we need to provide aria-label, if not the same you can add tooltip

Done.

@HansAlainNyaba
Copy link
Member Author

packages/geoview-custom-legend/tsconfig.json line 10 at r2 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Bring bac spaces

?? I dont understand this

Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

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

@jolevesq reviewed 2 files and all commit messages, made 6 comments, and resolved 3 discussions.
Reviewable status: 5 of 9 files reviewed, 7 unresolved discussions (waiting on @HansAlainNyaba).


packages/geoview-custom-legend/tsconfig.json line 10 at r2 (raw file):

Previously, HansAlainNyaba (Hans A ) wrote…

?? I dont understand this

[ { not [{


packages/geoview-custom-legend/src/index.tsx line 65 at r2 (raw file):

Previously, HansAlainNyaba (Hans A ) wrote…

Done.

When the same, not needed to set toltip


packages/geoview-custom-legend/schema.json line 7 at r5 (raw file):

  "type": "object",
  "properties": {
    "id": {

This is not needed


packages/geoview-custom-legend/schema.json line 11 at r5 (raw file):

      "description": "Unique identifier for the legend component"
    },
    "enabled": {

Will not be needed, if package there, it is enable


packages/geoview-custom-legend/schema.json line 112 at r5 (raw file):

      }
    },
    "display": {

Not a good object, not needed + all children elements


packages/geoview-custom-legend/schema.json line 176 at r5 (raw file):

      "description": "Schema version"
    },
    "entry": {

This is suppose to be child of legendItemLIst... what you already ahev in legend item list is a sub type of one of this... Look at how RAMP is done

@HansAlainNyaba
Copy link
Member Author

packages/geoview-custom-legend/schema.json line 112 at r5 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Not a good object, not needed + all children elements

OOK I removed "display" item

@HansAlainNyaba
Copy link
Member Author

packages/geoview-custom-legend/schema.json line 176 at r5 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

This is suppose to be child of legendItemLIst... what you already ahev in legend item list is a sub type of one of this... Look at how RAMP is done

`

@HansAlainNyaba
Copy link
Member Author

packages/geoview-custom-legend/src/index.tsx line 65 at r2 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

When the same, not needed to set toltip

Done.

Copy link
Member Author

@HansAlainNyaba HansAlainNyaba left a comment

Choose a reason for hiding this comment

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

@HansAlainNyaba made 6 comments.
Reviewable status: 3 of 9 files reviewed, 7 unresolved discussions (waiting on @jolevesq).


packages/geoview-custom-legend/schema.json line 7 at r5 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

This is not needed

Done.


packages/geoview-custom-legend/schema.json line 11 at r5 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Will not be needed, if package there, it is enable

Done.


packages/geoview-custom-legend/schema.json line 112 at r5 (raw file):

Previously, HansAlainNyaba (Hans A ) wrote…

OOK I removed "display" item

Done


packages/geoview-custom-legend/schema.json line 176 at r5 (raw file):

Previously, HansAlainNyaba (Hans A ) wrote…

`

We have entry in ramp


packages/geoview-custom-legend/tsconfig.json line 10 at r2 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

[ { not [{

Done.


packages/geoview-custom-legend/src/index.tsx line 65 at r2 (raw file):

Previously, HansAlainNyaba (Hans A ) wrote…

Done.

What need to be the same? tooltip == "aria-label" I dont understand

Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

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

@jolevesq reviewed 3 files and all commit messages, made 4 comments, and resolved 6 discussions.
Reviewable status: 6 of 9 files reviewed, 4 unresolved discussions (waiting on @HansAlainNyaba).


packages/geoview-custom-legend/schema.json line 176 at r5 (raw file):

Previously, HansAlainNyaba (Hans A ) wrote…

We have entry in ramp

Yes but need to be a child on legendList. In your PR it is totally disconnected from the array of element


packages/geoview-custom-legend/src/custom-legend.tsx line 20 at r6 (raw file):

}

interface FilterConfig {

What is this for?


packages/geoview-custom-legend/src/custom-legend.tsx line 35 at r6 (raw file):

  visible?: boolean;
  layerId?: string;
  filter?: FilterConfig;

This is not use...


packages/geoview-custom-legend/src/custom-legend-style.ts line 10 at r6 (raw file):

 */
export const getSxClasses = <T extends Record<string, unknown>>(theme: T): SxClasses => {
  const typedTheme = theme as unknown as {

Theme is in the core... you are not able to reuse?

@HansAlainNyaba HansAlainNyaba force-pushed the 2363-custom-legend4 branch 2 times, most recently from 6a45729 to e22eee4 Compare January 14, 2026 22:32
Copy link
Member Author

@HansAlainNyaba HansAlainNyaba left a comment

Choose a reason for hiding this comment

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

@HansAlainNyaba made 4 comments.
Reviewable status: 4 of 9 files reviewed, 4 unresolved discussions (waiting on @jolevesq).


packages/geoview-custom-legend/schema.json line 176 at r5 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Yes but need to be a child on legendList. In your PR it is totally disconnected from the array of element

Done.


packages/geoview-custom-legend/src/custom-legend.tsx line 20 at r6 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

What is this for?

copilot garbage.. will remove it


packages/geoview-custom-legend/src/custom-legend.tsx line 35 at r6 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

This is not use...

Done.


packages/geoview-custom-legend/src/custom-legend-style.ts line 10 at r6 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Theme is in the core... you are not able to reuse?

another complication from copilot will do different

Copy link
Member Author

@HansAlainNyaba HansAlainNyaba left a comment

Choose a reason for hiding this comment

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

@HansAlainNyaba made 1 comment.
Reviewable status: 4 of 9 files reviewed, 4 unresolved discussions (waiting on @jolevesq).


packages/geoview-custom-legend/schema.json line 176 at r5 (raw file):

Previously, HansAlainNyaba (Hans A ) wrote…

Done.

the entry is now under legendlist

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.

2 participants