Skip to content

PB-123 : Change color of hovered feature#639

Merged
pakb merged 5 commits intodevelopfrom
feat_PB-123_change_color_hovered_feature
Feb 21, 2024
Merged

PB-123 : Change color of hovered feature#639
pakb merged 5 commits intodevelopfrom
feat_PB-123_change_color_hovered_feature

Conversation

@pakb
Copy link
Contributor

@pakb pakb commented Feb 12, 2024

@cypress
Copy link

cypress bot commented Feb 12, 2024

Passing run #663 ↗︎

0 176 21 0 Flakiness 0

Details:

PB-123 : renaming payload to match naming convention
Project: web-mapviewer Commit: 4e1be7877c
Status: Passed Duration: 03:52 💡
Started: Feb 21, 2024 1:46 PM Ended: Feb 21, 2024 1:50 PM

Review all test suite changes for PR #639 ↗︎

@pakb pakb force-pushed the feat_PB-269_gpx_kml_feature_generic_identification branch from c178ac6 to 043f2e7 Compare February 13, 2024 09:01
@pakb pakb force-pushed the feat_PB-123_change_color_hovered_feature branch from eb5d663 to 2b8bb0c Compare February 13, 2024 09:07
@pakb pakb force-pushed the feat_PB-269_gpx_kml_feature_generic_identification branch 2 times, most recently from f242bfe to cb519a6 Compare February 15, 2024 09:50
@pakb pakb force-pushed the feat_PB-123_change_color_hovered_feature branch from 2b8bb0c to fcfa473 Compare February 15, 2024 09:50
@pakb pakb marked this pull request as ready for review February 15, 2024 11:01
@pakb pakb requested a review from ltshb February 15, 2024 11:01
Copy link
Contributor

@ltshb ltshb left a comment

Choose a reason for hiding this comment

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

Code looks good however on the old viewer the feature on the tooltip overlay was also marked with a hover color, this would be also great to have this on the new viewer, not only changing the feature color but also the tooltip color.

@pakb
Copy link
Contributor Author

pakb commented Feb 15, 2024

Code looks good however on the old viewer the feature on the tooltip overlay was also marked with a hover color, this would be also great to have this on the new viewer, not only changing the feature color but also the tooltip color.

That might be challenging with the concept of Infobox. In this regards, I also saw that the Infobox doesn't trigger the hover mechanism, so I have to rethink how I do it.
I tried to keep it isolated to OpenLayersHighlightedFeatures.vue, but if we want to have this also triggered through the Infobox I'm afraid I have to store this hovered feature somewhere in the store

@pakb pakb force-pushed the feat_PB-123_change_color_hovered_feature branch from fcfa473 to 57a35a3 Compare February 16, 2024 10:33
@pakb pakb force-pushed the feat_PB-269_gpx_kml_feature_generic_identification branch from a677595 to 17ed9d2 Compare February 19, 2024 09:00
Base automatically changed from feat_PB-269_gpx_kml_feature_generic_identification to develop February 20, 2024 12:40
@pakb pakb force-pushed the feat_PB-123_change_color_hovered_feature branch 2 times, most recently from 723c57f to 80c8735 Compare February 21, 2024 08:07
@pakb pakb requested a review from ltshb February 21, 2024 08:19
@pakb pakb force-pushed the feat_PB-123_change_color_hovered_feature branch from 80c8735 to e524d2f Compare February 21, 2024 10:04
Comment on lines +29 to +39
store.dispatch('setHighlightedFeatureId', {
featureId: feature?.id,
dispatcher: 'FeatureList.vue',
})
}
function clearHighlightedFeature() {
store.dispatch('setHighlightedFeatureId', { featureId: null, dispatcher: 'FeatureList.vue' })
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on your comment of #644 I would use highlightedFeatureId instead of featureId

pakb added 5 commits February 21, 2024 14:43
according to Vite documentation and a quick search on this, it is required to have the SCSS file be named .module.scss so that Vite can handle it correctly to pass things to JS
Simplifying a bit style function, as points can also have a fill (it won't change the look and feel)

I've used two colors defined in our SCSS as starting point for the highlighting colors, and use a tool that "spread" the colors to chose the two middle points (also making sure it is color blind safe)
instead of adding a border around the feature detail, we now change the whole feature detail's background color to signify it is highlighted
@pakb pakb force-pushed the feat_PB-123_change_color_hovered_feature branch from 27c4e44 to 4e1be78 Compare February 21, 2024 13:43
@pakb pakb merged commit 3b5b191 into develop Feb 21, 2024
@pakb pakb deleted the feat_PB-123_change_color_hovered_feature branch February 21, 2024 13:50
@cypress cypress bot mentioned this pull request Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants