fix(ai-companion-fab): equilateral hex + no NC button chrome#198
Merged
Conversation
CnAiFloatingButton was inheriting Nextcloud's default <button> styles (light blue background, 8px border-radius, 8px 12px padding), and its square 60x60 box made the pointy-top hex polygon render with unequal sides (taller faces vs shorter top/bottom slopes). This patch: - Sets the button to 52x60 (an exact √3:2 ratio) so the six vertices of the polygon land on equal-length sides — a true equilateral pointy-top hexagon per Conduction brand rules. - Strips every inherited NC button style: padding, margin, border, border-radius, background, box-shadow — !important blocks because the same problem we hit with .cn-ai-companion: webpack bundles both the package's CJS and ESM CSS into one consumer bundle and the cascade is unpredictable. - Forces the hex inner span to fully cover the button (100% x 100%) and explicitly removes any inherited border-radius. Visually: no more light blue rectangle around the hex; the icon sits inside a clean, equilateral Conduction-Cobalt hex.
Contributor
|
🎉 This PR is included in version 1.0.0-beta.31 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
Summary
Follow-up to #197. Fixes two visual issues with the AI Chat Companion FAB:
CnAiFloatingButtonwas inheriting Nextcloud's default<button>chrome (background: rgb(217, 227, 232),border-radius: 8px,padding: 8px 12px).Fix
√3:2ratio that makes the six pointy-top polygon sides equal length.!important(same trick we used for.cn-ai-companion, same reason: webpack bundles both CJS + ESM CSS into one consumer bundle and the cascade is unpredictable).border-radius: 0.Verified
Runtime CSS-override test in decidesk shows the clean equilateral hex with no surrounding box. Conduction Cobalt
#4376fcsolid, white sparkles icon, pointy-top point-up per brand rule.Test plan