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

Replace all title attributes with actual boostrap tooltip functionality #1533

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

kelanik8
Copy link
Contributor

The following changes are implemented

TODO: Summary

Changes in the user interface:

TODO: Add screenshots, recordings or remove this section

Checklist when submitting a final (!draft) PR

  • Commits are tidied up, squashed if needed and follow guidelines in CONTRIBUTING.md
  • Code builds
  • All existing tests pass
  • All new critical code is covered by tests
  • PR is linked to the relevant issue(s)
  • Rebased with the target branch

@kelanik8 kelanik8 force-pushed the 2023.9.x-feature-tooltip-refactor branch from 5f70af1 to d1f974b Compare November 21, 2023 16:54
@kelanik8 kelanik8 requested a review from Fajfa November 21, 2023 16:54
@kelanik8 kelanik8 linked an issue Nov 21, 2023 that may be closed by this pull request
@@ -35,7 +35,7 @@
/>
<l-control class="leaflet-bar">
<a
:title="$t('tooltip.goToCurrentLocation')"
v-b-tooltip.hover="{ title: $t('tooltip.goToCurrentLocation'), container: '#body' }"
Copy link
Member

Choose a reason for hiding this comment

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

I suggest you skip this and do it in the other issue PR, to avoid conflicts. Up to you tho

@@ -15,8 +15,8 @@
class="d-flex align-items-center text-primary p-0"
>
<span
v-b-tooltip.hover="{ title: label, container: '#body' }"
Copy link
Member

Choose a reason for hiding this comment

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

Same here, i would do it on the map issue instead to avoid conflicts and possible problems with that

@@ -49,7 +49,7 @@
/>
<l-control class="leaflet-bar">
<a
:title="$t('geometry.tooltip.goToCurrentLocation')"
v-b-tooltip.hover="{ title: $t('geometry.tooltip.goToCurrentLocation'), container: '#body' }"
Copy link
Member

Choose a reason for hiding this comment

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

Same here (regarding conflicts)

@@ -22,7 +22,7 @@
/>
<l-control class="leaflet-bar">
<a
:title="$t('geometry.tooltip.goToCurrentLocation')"
v-b-tooltip.hover="{ title: $t('geometry.tooltip.goToCurrentLocation'), container: '#body' }"
Copy link
Member

Choose a reason for hiding this comment

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

Same here (regarding conflicts)

@kelanik8 kelanik8 force-pushed the 2023.9.x-feature-tooltip-refactor branch from c44c1eb to 27af2a4 Compare November 24, 2023 13:12
@katrinDY
Copy link
Contributor

katrinDY commented Nov 24, 2023

Please, discuss everything with Jože before starting to work on it. Sorry for the long comment

A couple of issues:

  • prev and next btn in recs ignore
    1

  • tooltips in sidebar compose
    3

A couple of suggestions:

  • do we need a toolbar that says the same thing as the permission rule?
Screenshot 2023-11-24 at 15 27 36
  • module field value translations: maybe change it to Field translation singular since it's pointing to a specific field
Screenshot 2023-11-24 at 15 31 22
  • same question here: does this make sense?
Screenshot 2023-11-24 at 15 37 19
  • made add a tooltip for this since non-devs may be confused what's expected of them
Screenshot 2023-11-24 at 15 44 18
  • add tooltips to ns edit translations
Screenshot 2023-11-24 at 15 49 29

@Fajfa
Copy link
Member

Fajfa commented Nov 27, 2023

  1. If button has only an icon it needs a tooltip
  2. If it has text, it should keep using :title

Add "Expression" and "Warning text" tooltips
Add Namespace translation tooltip

@@ -37,6 +40,10 @@
<script>

export default {
i18nOptions: {
Copy link
Member

Choose a reason for hiding this comment

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

Does this break anything else tho? Since it wasn't there before

@@ -76,7 +76,10 @@
:placeholder="$t('validators.expression.placeholder')"
/>
<b-input-group-prepend>
<b-button variant="warning">
<b-button
v-b-tooltip.hover="{ title: $t('validators.error.placeholder'), container: '#body' }"
Copy link
Member

Choose a reason for hiding this comment

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

A bit confused what this translation means, it should be validators.error.tooltip
And should be Warning text

class="d-inline-block mw-100 pt-0"
:class="{ 'py-1': !horizontal }"
:title="label"
Copy link
Member

Choose a reason for hiding this comment

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

class is always last, not sure why you moved it after it. Same for the others
Guess the linter issue will make this easier

@kelanik8 kelanik8 force-pushed the 2023.9.x-feature-tooltip-refactor branch from 6f9de1a to 0a7e50d Compare November 28, 2023 16:34
@katrinDY
Copy link
Contributor

Two things to address:

  1. Missing tooltip for translations btn in gauge chart
Screenshot 2023-11-29 at 15 34 14
  1. Tooltip position for reminders
Screen.Recording.2023-11-29.at.15.37.02.mov

@@ -1,6 +1,7 @@
<template>
<c-translator-button
v-if="canManageResourceTranslations && resourceTranslationsEnabled"
v-b-tooltip.hover="{ title: tooltip, container: '#body' }"
Copy link
Member

Choose a reason for hiding this comment

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

Why do it here if you made a prop for c-translator-button?

@@ -45,6 +46,11 @@ export default {
type: Boolean,
default: () => false,
},

tooltip: {
Copy link
Member

Choose a reason for hiding this comment

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

since you do a v-bind to the c-translator-button, you don't need to define the prop

@@ -19,6 +19,7 @@
/>
<b-input-group-append>
<chart-translator
:tooltip="$t('general.translations')"
Copy link
Member

Choose a reason for hiding this comment

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

Instead of doing it on every chart translator, might make sense to just do it in the chart-translator component dirrectly.

@@ -11,7 +11,7 @@
<hr v-if="r.dismissedAt && sortedReminders[i - 1] ? !sortedReminders[i - 1].dismissedAt : false ">

<div
class="overflow-auto border card shadow-sm my-2 p-1"
class="border card shadow-sm my-2 p-1"
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure we can just remove the overflow-auto? Pretty sure it was there for a reason

@kelanik8 kelanik8 force-pushed the 2023.9.x-feature-tooltip-refactor branch from 880dd9f to 04b2b5d Compare November 30, 2023 12:05
@kelanik8 kelanik8 force-pushed the 2023.9.x-feature-tooltip-refactor branch from 04b2b5d to 62f57d1 Compare November 30, 2023 14:02
@kelanik8 kelanik8 merged commit 62f57d1 into 2023.9.x Nov 30, 2023
1 check passed
@kelanik8 kelanik8 deleted the 2023.9.x-feature-tooltip-refactor branch November 30, 2023 14:04
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.

Replace all :title tooltips with actual v-b.tooltips
3 participants