Skip to content

feat: Updated Tooltips Component with Improved Layout and New Experim… - #148

Merged
ralvarez-dg merged 1 commit into
mainfrom
task/implement-dynamic-variables-in-map-tooltip
Aug 25, 2026
Merged

feat: Updated Tooltips Component with Improved Layout and New Experim…#148
ralvarez-dg merged 1 commit into
mainfrom
task/implement-dynamic-variables-in-map-tooltip

Conversation

@timothygachengo

Copy link
Copy Markdown
Contributor

…ental Components

  • Wrapped tooltip variables in a PanelBody with a title for better organization.
  • Replaced standard text elements with experimental Text components for improved styling.
  • Added dividers for better visual separation between sections.
  • Updated measures and dimensions display to include labels for clarity.
  • Passed allMeasures and allDimensions as props to APITooltipGuide for dynamic rendering.

Description

Type of change

  • Bug fix (fix:)
  • New feature (feat:)
  • Breaking change (BREAKING CHANGE:)
  • Refactor / chore (refactor: / chore:)
  • Documentation update (docs:)

Affected package(s)

  • @devgateway/dvz-wp-commons
  • @devgateway/create-wp-customizer
  • @devgateway/upgrade-wp-customizer
  • plugins/wp-react-blocks-plugin
  • [] plugins/wp-react-custom-api
  • plugins/wp-react-custom-rest-menu
  • Other plugin / theme / Docker (no changeset needed)

Checklist

  • PR title follows Conventional Commits format
  • pnpm build passes locally
  • No hardcoded credentials, internal URLs, client names, or PII introduced
  • Any new dependency has a GPL-2.0-or-later-compatible license (MIT, BSD, Apache-2.0, ISC are all compatible)

…ental Components

- Wrapped tooltip variables in a PanelBody with a title for better organization.
- Replaced standard text elements with experimental Text components for improved styling.
- Added dividers for better visual separation between sections.
- Updated measures and dimensions display to include labels for clarity.
- Passed allMeasures and allDimensions as props to APITooltipGuide for dynamic rendering.
Copilot AI lite review requested due to automatic review settings August 25, 2026 13:48
@ralvarez-dg
ralvarez-dg merged commit a73b9d3 into main Aug 25, 2026
4 of 5 checks passed
@timothygachengo
timothygachengo deleted the task/implement-dynamic-variables-in-map-tooltip branch August 25, 2026 13:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Map block’s tooltip configuration UI to improve readability and organization, including showing labeled measure/dimension variables and wiring additional metadata into the Tooltips component.

Changes:

  • Reworked the tooltip variable guide UI: grouped variables into a collapsible panel, switched headings to experimental Text, and added dividers.
  • Updated the tooltip variable listings to display labels (e.g., Measure Label -> {measure_value}) and added a new dimensions section.
  • Passed allMeasures and allDimensions down into Tooltips/APITooltipGuide from the map block editor.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
plugins/wp-react-blocks-plugin/blocks/map/Tooltips.js Refactors tooltip-variable guide layout and renders measures/dimensions with labels.
plugins/wp-react-blocks-plugin/blocks/map/BlockEdit.js Passes measures/dimensions into Tooltips and includes broader formatting/structural edits in the Map block editor.
Suppressed comments (1)

plugins/wp-react-blocks-plugin/blocks/map/Tooltips.js:119

  • The dimensions list iterates over allDimensions (which includes the default { label: "None", value: "none" }) and also uses key={d} where d is an object. This will render a misleading "None -> {none}" entry and produces duplicate React keys.
      {allDimensions &&
        allDimensions.map((d) => (
          <PanelRow key={d}>
            <p

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 96 to 99
{allMeasures &&
allMeasures.map((m) => (
<PanelRow key={m}>
<p
Comment on lines +99 to +104
this.setState(
{
taxonomies: data,
},
this.getTaxonomyValues(data),
);
Comment on lines +410 to 417
if (event.data.type == "map") {
const iframeOrigin = event.origin.split(":")[0];
const parentOrigin = window.location.origin.split(":")[0];

if (iframeOrigin == parentOrigin) {
setAttributes({ mapPosition: event.data.value });
}
}
Comment on lines +621 to +627
{mapFiles &&
mapFiles
.filter((f) => f.value)
.map((file) => {
return (
<>
<PanelRow>
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.

3 participants