Skip to content

fix(embed): scope CSS preflight and add navbar brand props#11

Merged
joaner merged 3 commits into
ioai-tech:mainfrom
joaner:fix/embed-css-navbar-brand
Jun 4, 2026
Merged

fix(embed): scope CSS preflight and add navbar brand props#11
joaner merged 3 commits into
ioai-tech:mainfrom
joaner:fix/embed-css-navbar-brand

Conversation

@joaner
Copy link
Copy Markdown
Contributor

@joaner joaner commented Jun 4, 2026

Summary

  • Disable Tailwind global preflight and inject an equivalent reset scoped to #rosview-root, so importing @ioai/rosview/style.css no longer resets host navbar/button styles in Next.js and other embed scenarios.
  • Add showNavbarBrand and navbarBrandLabel on RosViewer so hosts can hide or replace the default left navbar "ROS View" label while keeping File/Layout menus.
  • Document CSS scoping and navbar branding in docs/EMBEDDING.md and docs/EMBEDDING.zh.md.

Test plan

  • npm run build:lib succeeds; built CSS has no naked element preflight selectors
  • Embed in a Next.js app with existing navbar — host styles remain intact after importing @ioai/rosview/style.css
  • showNavbarBrand={false} hides the left brand button; File/Layout menus still visible
  • navbarBrandLabel="Custom Name" replaces default product name in navbar
  • Default behavior unchanged when props are omitted

joaner added 3 commits June 4, 2026 12:25
Disable global preflight and inject an equivalent reset under #rosview-root
so importing @ioai/rosview/style.css no longer resets host navbar/button styles.
Expose showNavbarBrand and navbarBrandLabel on RosViewer so hosts can hide
or replace the default ROS View label, and document CSS scoping plus branding
in the English and Chinese embedding guides.
…lotChart logic

Introduce a new utility function to determine if the X axis should be pinned to the full log range during incremental updates. Update the usePlotChart implementation to utilize this function, ensuring the X scale remains consistent while data is loading. Additionally, refine the scoped preflight CSS for better integration with the host application.
@joaner joaner merged commit 72cafc9 into ioai-tech:main Jun 4, 2026
2 checks passed
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.

1 participant