Skip to content

PB-1384 : tooltip module#1282

Merged
pakb merged 7 commits intodevelopfrom
feat-PB-1384-tooltip-module
Mar 31, 2025
Merged

PB-1384 : tooltip module#1282
pakb merged 7 commits intodevelopfrom
feat-PB-1384-tooltip-module

Conversation

@pakb
Copy link
Contributor

@pakb pakb commented Mar 27, 2025

I will need to use the tooltip in the elevation profile module, so I've exported the component for the tooltip as a "lib"

Test link

@pakb pakb force-pushed the feat-PB-1384-tooltip-module branch from 1cbd484 to 9e3440f Compare March 27, 2025 11:52
I will need to use the tooltip in the elevation profile module, so I've exported the component for the tooltip as a "lib"
@pakb pakb force-pushed the feat-PB-1384-tooltip-module branch from 9e3440f to 51627e3 Compare March 27, 2025 15:56
@cypress
Copy link

cypress bot commented Mar 27, 2025

web-mapviewer    Run #4892

Run Properties:  status check passed Passed #4892  •  git commit ffe03b3b6a: Merge pull request #1282 from geoadmin/feat-PB-1384-tooltip-module
Project web-mapviewer
Branch Review develop
Run status status check passed Passed #4892
Run duration 01m 39s
Commit git commit ffe03b3b6a: Merge pull request #1282 from geoadmin/feat-PB-1384-tooltip-module
Committer Pascal Barth
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 1
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 48
View all changes introduced in this branch ↗︎

schtibe and others added 3 commits March 28, 2025 10:40
no unit test for package tooltip, so removing targets (so that they don't get called and fail)
@pakb pakb force-pushed the feat-PB-1384-tooltip-module branch from e77f5aa to 97a094c Compare March 28, 2025 13:16
@pakb pakb requested a review from schtibe March 28, 2025 13:27
pakb added 2 commits March 28, 2025 14:38
tailwind applies a max-width: 100% to all img tags, and that was breaking our BG wheel (S)CSS
to mitigate some edge case bug in Vue's defineTemplate function, if you name the variable the same name as the template ref it starts spewing warning message like crazy when the project is bundled/built and imported elsewhere
Copy link
Contributor

@schtibe schtibe left a comment

Choose a reason for hiding this comment

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

LGTM, just a few minor remarks about details

top: `${middlewareData.arrow.y}px`,
}"
class="tw:absolute tw:h-0 tw:w-0 tw:after:content-[''] tw:after:h-0 tw:after:w-0 tw:after:fixed tw:after:top-[inherit] tw:after:left-[inherit] tw:after:z-[-1]"
:class="{
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it could make sense to move this into a computed to keep the HTML part less cluttered? I think it is rather easy to construct arrays or objects that will the be passed to the attribute

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I really don't like when we mix our JS code with HTML class generation, that's why I tried to kept everything related to Tailwind described in the template section.

It could be improved a bit if moved to JS, but as I said, I prefer to keep the JS doing its part (interaction, reactivity, etc) and let the template be responsible for the styling

@@ -0,0 +1,49 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you could run a pnpm format on this file.

@@ -0,0 +1,2 @@
@import 'tailwindcss' prefix(tw);
@import '@geoadmin/tooltip/tailwindcss';
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this line doing anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

without it, the tailwind classes from the @geoadmin/tooltip module are ignored and not taken into account in the mapviewer package's tailwind output

@schtibe
Copy link
Contributor

schtibe commented Mar 28, 2025

Oh maybe you could also add the new module to vitest.workspace.js

@pakb pakb merged commit ffe03b3 into develop Mar 31, 2025
6 checks passed
@pakb pakb deleted the feat-PB-1384-tooltip-module branch March 31, 2025 13:26
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