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

feature(Swiper) - Using new Swiper store, small guide fix, better info logs, some other fixes and comments #1858

Merged

Conversation

Alex-NRCan
Copy link
Member

@Alex-NRCan Alex-NRCan commented Feb 26, 2024

Description

Stores created
Style class created and separated from component
Fix for the path for the guide panel
Swiper, working state
Swiper improved
Moved the addEventListener and removeEventListener from the rendering phase to a useEffect mount hook.
Better logs and comments
Swiper working
Had to use async afterall to retrieve the OpenLayers layers
Adjusting the swiper template configs to use layer path
Finalizing
Cleanup

Fixes #1820

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?

Hosted here as of Feb. 26 15h: https://alex-nrcan.github.io/geoview/package-swiper.html

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

@Alex-NRCan Alex-NRCan self-assigned this Feb 26, 2024
@Alex-NRCan Alex-NRCan force-pushed the feat-swiper-store branch 2 times, most recently from 359d8ef to cce9c13 Compare February 26, 2024 18:00
@Alex-NRCan Alex-NRCan marked this pull request as ready for review February 26, 2024 18:28
@Alex-NRCan Alex-NRCan changed the title feature(Swiper) - Using new Swiper store, small guide fix, some other fixes and comments feature(Swiper) - Using new Swiper store, small guide fix, better info logs, some other fixes and comments Feb 26, 2024
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.

Reviewed 19 of 21 files at r1, 1 of 2 files at r2, all commit messages.
Reviewable status: 19 of 22 files reviewed, 6 unresolved discussions (waiting on @Alex-NRCan)


packages/geoview-core/src/api/event-processors/event-processor-children/swiper-event-processor.ts line 23 at r1 (raw file):

   * @returns An array of the subscriptions callbacks which were created
   */
  protected onInitialize(store: GeoviewStoreType): Array<() => void> | void {

I think the onInit method should be before the big block of comments as it is not static


packages/geoview-core/src/api/event-processors/event-processor-children/swiper-event-processor.ts line 81 at r1 (raw file):

  /**
   * Adds a swipe functionality to the specified map id and layer path

Typo swipe, should it be swiper?


packages/geoview-core/src/api/event-processors/event-processor-children/swiper-event-processor.ts line 111 at r1 (raw file):

  /**
   * Removes a swipe functionality for the specified map id and layer path

Typo swipe, should it be swiper?


packages/geoview-core/src/api/event-processors/event-processor-children/swiper-event-processor.ts line 141 at r1 (raw file):

  /**
   * Removes the swipe functionality for all layer paths

Typo swipe, should it be swiper?


packages/geoview-core/src/core/components/guide/guide-panel.tsx line 64 at r1 (raw file):

  // fetch the content of general guide items with custom hook
  let mdFilePath = '/geoview/public/locales/markdown/general-content.md';

Hum this should be relative to the location of main.js file.... ./locales/help/help.md We may need a specific issue if requires too much work


packages/geoview-core/src/geo/layer/layer.ts line 529 at r1 (raw file):

   * @returns {BaseLayer | LayerGroup} Returns the OpenLayer layer associated to the layer path.
   */
  getLayerByLayerPath = (layerPath: string): BaseLayer | LayerGroup => {

Should we call getOLLayer... to have ol in the name for clarity?

Copy link
Member Author

@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.

Reviewable status: 16 of 22 files reviewed, 3 unresolved discussions (waiting on @Alex-NRCan and @jolevesq)


packages/geoview-core/src/api/event-processors/event-processor-children/swiper-event-processor.ts line 23 at r1 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

I think the onInit method should be before the big block of comments as it is not static

True! Done.


packages/geoview-core/src/core/components/guide/guide-panel.tsx line 64 at r1 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Hum this should be relative to the location of main.js file.... ./locales/help/help.md We may need a specific issue if requires too much work

True, that might work. Let me try that in the host I'm doing when I push this.


packages/geoview-core/src/geo/layer/layer.ts line 529 at r1 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Should we call getOLLayer... to have ol in the name for clarity?

Yep, sounds good to me. 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.

Reviewed 6 of 6 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Alex-NRCan)

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.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Alex-NRCan)

Stores created
Style class created and separated from component
Fix for the path for the guide panel
Swiper, working state
Swiper improved
Moved the addEventListener and removeEventListener from the rendering phase to a useEffect mount hook.
Better logs and comments
Swiper working
Had to use async afterall to retrieve the OpenLayers layers
Adjusting the swiper template configs to use layer path
Finalizing
Cleanup
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.

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Alex-NRCan)

@jolevesq jolevesq merged commit 0ce303d into Canadian-Geospatial-Platform:develop Feb 26, 2024
6 checks passed
@Alex-NRCan Alex-NRCan deleted the feat-swiper-store branch February 28, 2024 15:19
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.

[REFACTOR] Swiper use store
2 participants