Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(table): EsriDynamic does not have right icon after no fetch of ge… #2590

Merged

Conversation

jolevesq
Copy link
Member

@jolevesq jolevesq commented Nov 13, 2024

…ometry

Closes #2585-table-icon-dynamic

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.

Since we do not fetch geometry for esriDynamic, the geoview-renderer defaulted to first icon for all feature.
Fixes #2585, #2536

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.
Hosted November 10th: 11:20
https://jolevesq.github.io/geoview/demos-navigator.html?config=./configs/navigator/16-esri-dynamic.json

  • See table with all icons for esri dynamic (2585)
  • Toggle visibility class for layers and open table to see values are filtered (2536)

https://jolevesq.github.io/geoview/demos-navigator.html?config=./configs/navigator/17-esri-feature.json

  • Toggle visibility class for layers and open table to see values are filtered (2536)

https://jolevesq.github.io/geoview/demos-navigator.html?config=./configs/navigator/19-geojson.json

  • Toggle visibility class for layers and open table to see values are filtered (2536)
  • See table polygon missing Alberta pink icon. It is there now (2536)

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

@jolevesq jolevesq force-pushed the 2585-table-icon-dynamic branch from e3a6a47 to 68c77cf Compare November 19, 2024 20:02
@jolevesq jolevesq marked this pull request as ready for review November 20, 2024 16:14
Copy link
Member

@Alex-NRCan Alex-NRCan left a comment

Choose a reason for hiding this comment

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

Reviewed 8 of 12 files at r2, 2 of 4 files at r3, 3 of 3 files at r4, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @DamonU2 and @jolevesq)


packages/geoview-core/src/geo/layer/gv-layers/raster/gv-esri-dynamic.ts line 128 at r4 (raw file):

      // Guess the geometry type by taking the first style key
      // TODO: Refactor - Layers migration. Johann: This will be modified with new schema, there is no more geometry on style
      const [geometryType] = layerConfig.getTypeGeometries();

Nice cleanup


packages/geoview-core/src/geo/utils/renderer/geoview-renderer.ts line 1603 at r4 (raw file):

  let canvas: HTMLCanvasElement | undefined;

  // GV: Some time, the feature will have no geometry e.g. esriDynamic has we fetch geometry only when needed

Minor typos:
Some time => Sometimes
has we => as we


packages/geoview-core/src/geo/utils/renderer/geoview-renderer.ts line 1600 at r4 (raw file):

  legendFilterIsOff?: boolean,
  useRecycling?: boolean,
  callbackForDataUrl?: () => Promise<string | null>

Si tu as le temps de m'en parler un peu, je serais curieux de voir comment tu as remplacé ce callback. Il me semble que ça servait? Ça ne ramasse plus le legendIcons![0].iconImage dans abstract-geoview-layers.formatFeatureInfoResult() et abstract-gv-layers?

Copy link
Member

@DamonU2 DamonU2 left a comment

Choose a reason for hiding this comment

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

Reviewed 8 of 12 files at r2, 2 of 4 files at r3, 3 of 3 files at r4, 2 of 2 files at r5, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @jolevesq)


packages/geoview-core/src/api/event-processors/event-processor-children/legend-event-processor.ts line 696 at r5 (raw file):

    // Sort class breaks by minValue for binary search
    // GV: Vlaues can be number, date, string, null or undefined. Should it be only Date or Number

Vlaues > Values


packages/geoview-core/src/api/event-processors/event-processor-children/legend-event-processor.ts line 697 at r5 (raw file):

    // Sort class breaks by minValue for binary search
    // GV: Vlaues can be number, date, string, null or undefined. Should it be only Date or Number
    // GV: undefine or null should not be allowed in class break style

undefine > undefined

@jolevesq jolevesq force-pushed the 2585-table-icon-dynamic branch from d0c0261 to 5efc527 Compare November 20, 2024 20:24
@jolevesq jolevesq merged commit d7b4fc4 into Canadian-Geospatial-Platform:develop Nov 20, 2024
5 of 6 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.

[BUG] Data Table icons do not reflect layers symbology
3 participants