feat: Updated Tooltips Component with Improved Layout and New Experim… - #148
Merged
ralvarez-dg merged 1 commit intoAug 25, 2026
Merged
Conversation
…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.
ralvarez-dg
approved these changes
Aug 25, 2026
timothygachengo
deleted the
task/implement-dynamic-variables-in-map-tooltip
branch
August 25, 2026 13:50
Contributor
There was a problem hiding this comment.
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
allMeasuresandallDimensionsdown intoTooltips/APITooltipGuidefrom 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 useskey={d}wheredis 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ental Components
Description
Type of change
fix:)feat:)BREAKING CHANGE:)refactor:/chore:)docs:)Affected package(s)
@devgateway/dvz-wp-commons@devgateway/create-wp-customizer@devgateway/upgrade-wp-customizerplugins/wp-react-blocks-pluginplugins/wp-react-custom-apiplugins/wp-react-custom-rest-menuChecklist
pnpm buildpasses locally