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

adding global style overrides #1815

Conversation

cphelefu
Copy link
Contributor

@cphelefu cphelefu commented Feb 16, 2024

Description

This PR fixes the layer icons in the map tooltip and details tab.

Fixes #1827

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.

https://cphelefu.github.io/geoview/

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

@cphelefu cphelefu force-pushed the adding-global-style-overrides branch 2 times, most recently from d63b1f5 to e766c1d Compare February 19, 2024 18:21
@cphelefu cphelefu marked this pull request as ready for review February 19, 2024 19:57
Copy link
Contributor

@kaminderpal kaminderpal 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: 0 of 24 files reviewed, 4 unresolved discussions (waiting on @cphelefu and @jolevesq)


packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx line 252 at r5 (raw file):

    if (layerChildIsSelected && !layerIsSelected && !isGroupOpen) {
      result.push('selectedLayer');
      result.push('bordered-primary');

this can be looks

Also i know selectedLayer as name done before, but can we follow same pattern like dash bordered-primary, so that we dnt have mismatch.

Code snippet:

result.push('bordered-primary selectLayer');

packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx line 257 at r5 (raw file):

    if (layerIsSelected) {
      result.push('selectedLayer');
      result.push('bordered-primary');

same here above


packages/geoview-core/src/core/components/nav-bar/nav-bar.tsx line 179 at r5 (raw file):

          {navBarComponents.includes('location') && <Location />}
          {navBarComponents.includes('home') && <Home />}
          {navBarComponents.includes('export') && <ExportButton sxDetails={sxClasses.navButton} className="" />}

Do we need className?


packages/geoview-core/src/ui/style/themeOptionsGenerator.ts line 212 at r5 (raw file):

        styleOverrides: {
          root: {
            '&.style1': {

R we still gonna use style1, style2, style3 naming convention?

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 9 of 9 files at r1, 4 of 10 files at r2, 2 of 5 files at r3, 3 of 6 files at r4, 8 of 12 files at r5, all commit messages.
Reviewable status: 17 of 24 files reviewed, 6 unresolved discussions (waiting on @cphelefu and @kaminderpal)


packages/geoview-core/src/ui/style/global-style-overrides.ts line 17 at r1 (raw file):

  },

  '.subtitle': {

Was this use for layer left panel tooltip?


packages/geoview-core/src/ui/style/themeOptionsGenerator.ts line 216 at r4 (raw file):

              color: `${geoViewColors.primary.main} !important`,
              '&:hover, &:active, &.active': {
                backgroundColor: `${geoViewColors.primary.light[400]} !important`,

Kaminder's comment about important in this file, does this apply here? I see a lot of !important


packages/geoview-core/src/ui/style/themeOptionsGenerator.ts line 212 at r5 (raw file):

Previously, kaminderpal (Kamy) wrote…

R we still gonna use style1, style2, style3 naming convention?

Agree, should have a better name to reflect state or type of use?

@cphelefu
Copy link
Contributor Author

packages/geoview-core/src/ui/style/global-style-overrides.ts line 17 at r1 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Was this use for layer left panel tooltip?

Its used for the links in the details table.
Also links in the modal thats displayed you click on the icon in the appbar.

@cphelefu
Copy link
Contributor Author

packages/geoview-core/src/ui/style/themeOptionsGenerator.ts line 212 at r5 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Agree, should have a better name to reflect state or type of use?

Yes, will be renaming those later as I use them. Not sure what to name them yet.

@cphelefu
Copy link
Contributor Author

packages/geoview-core/src/ui/style/themeOptionsGenerator.ts line 216 at r4 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

Kaminder's comment about important in this file, does this apply here? I see a lot of !important

Yes, it was applying to this file. Thats why I removed all the important statements

Copy link
Contributor Author

@cphelefu cphelefu 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: 14 of 25 files reviewed, 6 unresolved discussions (waiting on @jolevesq and @kaminderpal)


packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx line 252 at r5 (raw file):

Previously, kaminderpal (Kamy) wrote…

this can be looks

Also i know selectedLayer as name done before, but can we follow same pattern like dash bordered-primary, so that we dnt have mismatch.

Done.


packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx line 257 at r5 (raw file):

Previously, kaminderpal (Kamy) wrote…

same here above

Done.


packages/geoview-core/src/core/components/nav-bar/nav-bar.tsx line 179 at r5 (raw file):

Previously, kaminderpal (Kamy) wrote…

Do we need className?

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 2 of 6 files at r4, 2 of 12 files at r5, 5 of 6 files at r6, 2 of 2 files at r7, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @cphelefu)

@jolevesq jolevesq merged commit a59709b into Canadian-Geospatial-Platform:develop Feb 23, 2024
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] Fix layers icon to look the same in the map tooltip + details tab
3 participants