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

3807 - Fix invalid links tooltip not showing #3808

Conversation

yaguzmang
Copy link
Contributor

The root cause is that the DataCell component has its own tooltip data. Since it is higher in the DOM tree, its tooltip takes precedent over the editor tooltip.

image

And since the DataCell tooltip content is empty, nothing is shown.

Current Fix:
Setting the tooltip id in the DataCell only if it has content, that way it won't take precedent over the children tooltips if it is empty.

Other possible fix:
From the DataCell caller, passing data-tooltip-id only when the content is not empty. In DataSourceRow it would be something like:

    <DataRow actions={actions}>
      {componentsOrder.map((componentKey) => {
        const Component = Components[componentKey]
        return (
          <DataCell
            key={`${componentKey}-${dataSource.uuid}`}
            className={classNames({ 'validation-error': errors[componentKey] })}
            data-tooltip-content={errors[componentKey]}
        ->  data-tooltip-id={errors[componentKey] ? TooltipId.error : null}
            ...
2024-05-13.13-06-29.mp4

@yaguzmang yaguzmang self-assigned this May 13, 2024
@yaguzmang yaguzmang linked an issue May 13, 2024 that may be closed by this pull request
@mergify mergify bot merged commit dbb8679 into development May 13, 2024
5 checks passed
@mergify mergify bot deleted the 3807-descriptions-invalid-link-no-tooltip-error-message-shown branch May 13, 2024 18:47
mergify bot added a commit that referenced this pull request May 29, 2024
* 3797 - ODP - edit page allow 3 decimal digits to all percentage input fields (#3801)

* 3797 - Refactor PercentInput & add precision prop

* 3797 - Sanitizer: add precision prop for decimals

* 3797 - Revert PercentInput changes & add precision prop

* 3797 - Revert sanitizer changes

* 3797 - Add precision param to acceptNextDecimal

* 3797 - Allow input and paste with precision in odp percent fields

* 3797 - Fix deleting natural regenerating forest percent crashing the app

* 3797 - Add InputPercent component

* 3797 - Remove ramda from useOnChange

* 3807 - Fix tooltip not showing (#3808)

* 3804 - add MetadataController.addColumn + add 2023 col to fra 2025 tables 5a and 5b (#3806)

* v3.4.1

* 3802 - Enable and fix bulk download for 2025 (#3805)

* 3802 - Enable and fix bulk download for 2025

* 3802 - special case for degradedForest

* 3802 - fix 2020 annualreforestation

* 3802 - fix degradedForest, otherLandWithTreeCover, specificForestCategoriesVariables, forestCharacteristicsVariables

* 3802 - fix growingStockComposition

* 3802 - fix primaryDesignatedManagementObjectiveVariables, forestOwnershipVariables

* 3802 - fix 4a_individ

* 3802 - fix 4b_unknown

* 3802 - fix 4b_individuals

* 3802 - fix forestpolicy

* 3802 - fix areaofpermanentforestestate

* hotfix translations (#3814)

* Migrate missing total land area for 2020 (#3820)

* 3690 - User pictures to public.file (#3819)

* 3690 - Migrate user profile pictures to public.file

* 3690 - file cleanup: Don't remove user avatars

* 3690 - update user repository and related

* update user meta

* Fix user avatar update logic

* add migration foru ser table

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Graph title issue in FRA 2020 dashboard #3815  (#3817)

* en

* es

* ar

* zh

* ru

* fr

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* fix migration (#3826)

* fix style (#3828)

---------

Co-authored-by: Yhoan Alejandro Guzmán García <41337901+yaguzmang@users.noreply.github.com>
Co-authored-by: Mino Togna <minotogna@users.noreply.github.com>
Co-authored-by: minotogna <mino.togna@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot added a commit that referenced this pull request Jun 13, 2024
* 3797 - ODP - edit page allow 3 decimal digits to all percentage input fields (#3801)

* 3797 - Refactor PercentInput & add precision prop

* 3797 - Sanitizer: add precision prop for decimals

* 3797 - Revert PercentInput changes & add precision prop

* 3797 - Revert sanitizer changes

* 3797 - Add precision param to acceptNextDecimal

* 3797 - Allow input and paste with precision in odp percent fields

* 3797 - Fix deleting natural regenerating forest percent crashing the app

* 3797 - Add InputPercent component

* 3797 - Remove ramda from useOnChange

* 3807 - Fix tooltip not showing (#3808)

* 3804 - add MetadataController.addColumn + add 2023 col to fra 2025 tables 5a and 5b (#3806)

* v3.4.1

* 3802 - Enable and fix bulk download for 2025 (#3805)

* 3802 - Enable and fix bulk download for 2025

* 3802 - special case for degradedForest

* 3802 - fix 2020 annualreforestation

* 3802 - fix degradedForest, otherLandWithTreeCover, specificForestCategoriesVariables, forestCharacteristicsVariables

* 3802 - fix growingStockComposition

* 3802 - fix primaryDesignatedManagementObjectiveVariables, forestOwnershipVariables

* 3802 - fix 4a_individ

* 3802 - fix 4b_unknown

* 3802 - fix 4b_individuals

* 3802 - fix forestpolicy

* 3802 - fix areaofpermanentforestestate

* hotfix translations (#3814)

* Migrate missing total land area for 2020 (#3820)

* 3690 - User pictures to public.file (#3819)

* 3690 - Migrate user profile pictures to public.file

* 3690 - file cleanup: Don't remove user avatars

* 3690 - update user repository and related

* update user meta

* Fix user avatar update logic

* add migration foru ser table

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Graph title issue in FRA 2020 dashboard #3815  (#3817)

* en

* es

* ar

* zh

* ru

* fr

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* fix migration (#3826)

* fix style (#3828)

* 3781 - Restore Print tables Toolbar link (#3831)

* v3.4.2

* 3835: Data table UI: hide E flag to null value cells (#3836)

* 3743 - Broken Links  (#3811)

* 3743 - Broken Links - Add cycle link tables (#3791)

* 3743 - Add link tables

* 3743 - Reorder link types

* 3743 - Update link table

* 3743 - Update link type

* 3743 - Add locations and unique country/link constraint

* 3743 - Update link type

* 3743 - Broken links - Get all links to visit (#3812)

* 3743 - Get Descriptions and ODPs with links

* 3743 - Add Link controller -> get all links to visit

* 3743 - Broken Links - Add visit cycle links worker (#3813)

* 3743 - Add Link -> getMany

* 3743 - Add Link -> upsertMany

* 3743 - Add visit cycle links worker

* 3743 - Close worker connections

* 3743 - Fix update props

* 3743 - Broken links - Add API endpoints & activity logs (#3823)

* 3743 - Add Link api endpoints

* 3743 - Add worker activity logs

* 3743 - Rename Link to Links

* 3743 - Rename Link type folder to Links

* 3743 - Rename Link repository folder to Links

* 3743 - Rename Link api folder to Links

* 3743 - Rename Link controller folder to Links

* 3743 - Update tests Links import

* 3743 - Update activity log messages

* 3743 - Broken Links - Add sockets events and Get verification job status (#3830)

* 3743 - Add socket events

* 3743 - Add endpoint to get if the verification job is in progress

* 3743 Move getActiveVerifyJobs function

* 3743 - Add local emit event function

* 3743 - Add redux state and actions (#3832)

* 3743 - Add admin links route

* 3743 - Add translations

* 3743 - Add Admin links table

* 3743 - Update table with event listeners

* Revert "3743 - Update table with event listeners"

This reverts commit 66806e7.

* Revert "3743 - Add Admin links table"

This reverts commit d8f63fc.

* Revert "3743 - Add translations"

This reverts commit 24bbf33.

* Revert "3743 - Add admin links route"

This reverts commit 8f71842.

* 3743 - Broken Links - UI Table (#3833)

* 3743 - Add admin links route

* 3743 - Add translations

* 3743 - Add Admin links table

* 3743 - Update table with event listeners

* 3743 - Broken Links - Delete unused links and disable approve button (#3834)

* 3743 - Disable approve button when the verify job is running

* 3743 - Delete unused links

* 3743 - Soft delete unused links

* 3743 - Hide deleted links in the UI

* 3743 - Remove visits column

* 3743 - Update count on links table update

* 3743 - Add excludeDeleted default value

* 3743 - Remove visits count translation

---------

Co-authored-by: Yhoan Alejandro Guzmán García <41337901+yaguzmang@users.noreply.github.com>
Co-authored-by: Mino Togna <minotogna@users.noreply.github.com>
Co-authored-by: minotogna <mino.togna@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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.

Descriptions: Invalid Link no tooltip error message shown
2 participants