Skip to content

Infotip: Overlay controls tab - colors, offset and placement#55

Merged
nagpai merged 10 commits intomainfrom
feature/52-overlay-color-position
Jun 25, 2025
Merged

Infotip: Overlay controls tab - colors, offset and placement#55
nagpai merged 10 commits intomainfrom
feature/52-overlay-color-position

Conversation

@nagpai
Copy link
Contributor

@nagpai nagpai commented Jun 22, 2025

Summary

Add an "Overlay" tab to change the following

Related Issue

Closes #52

Testing instructions

  • Insert the infotip format on any text within the editor
  • Add some content for the infotip overlay
  • Click the Overlay tab and adjust various settings - Text and background color, Offset and placement.
  • Check the response to the changes via UI

@github-actions
Copy link

github-actions bot commented Jun 22, 2025

Preview via Cloudflare R2 Storage

⚡️WordPress Playground Preview
🚀 Build zip file Download

I will update this comment with the latest preview links as you push more changes to this PR.

Note

The preview sites are created using WordPress Playground. You can add content, edit settings, and test the pull request as you would on a real site, but please note that changes are not saved between sessions.

@nagpai nagpai changed the title WIP - Feature/52 overlay color position Infotip: Overlay controls tab - colors, offset and placement Jun 24, 2025
@nagpai nagpai marked this pull request as ready for review June 24, 2025 15:17
@nagpai nagpai requested a review from Copilot June 24, 2025 15:18
Copy link

Copilot AI left a comment

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 adds an "Overlay" tab to the infotip UI to allow users to adjust overlay colors, placement, and offset. Key changes include the addition of new overlay controls and UI elements in inline-ui.js, updates to attribute mappings in index.js, style adjustments in editor.scss, and modifications to the web component’s positioning logic in infotip-web-component.js.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/infotip/inline-ui.js Added OverlayTabContent with overlay offset, placement, and color controls
src/infotip/index.js Updated attribute mappings to support overlay-related properties
src/infotip/editor.scss Updated styles to include overlay tab labels and color settings
assets/infotip/infotip-web-component.js Adjusted floatingUI configuration and arrow positioning to incorporate overlay attributes
Comments suppressed due to low confidence (1)

src/infotip/inline-ui.js:173

  • Using the logical OR operator here will default valuing to 6 even when a valid offset of 0 is provided. Consider replacing '||' with the nullish coalescing operator (??) to explicitly handle undefined or null values.
				value={ activeAttributes.offset || 6 }

@nagpai nagpai requested review from Verma-Punit and ajitbohra and removed request for Verma-Punit and ajitbohra June 24, 2025 15:52
className="overlay-tab-label"
style={ { alignSelf: 'flex-start' } }
>
{ __( 'Colors', 'blablablocks-formats' ) }
Copy link
Contributor

Choose a reason for hiding this comment

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

@nagpai Just a small tweak maybe we could go with color instead of colors to keep it in line with the core naming since core uses color 😁.

Screenshot 2025-06-25 at 7 43 39 AM

Copy link
Member

Choose a reason for hiding this comment

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

@nagpai lets align this with core 💯

To follow we are preaching with our blablablocks "Close To Core"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well caught! I will change that :)

Copy link
Member

@ajitbohra ajitbohra left a comment

Choose a reason for hiding this comment

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

@nagpai

Tested and looks good for the most part; positioning still seems to be flaky, which we can address separately.
Code-wise, looks good to ship and iterate 🥇

@nagpai nagpai merged commit ae991cd into main Jun 25, 2025
2 checks passed
@nagpai nagpai deleted the feature/52-overlay-color-position branch June 25, 2025 11:08
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.

Infotip: Add color and position control for overlay

4 participants