Skip to content

Complete blueprint.js removal - #1682

Merged
jumpinjackie merged 7 commits into
masterfrom
chore/remove-blueprint
Jul 22, 2026
Merged

Complete blueprint.js removal#1682
jumpinjackie merged 7 commits into
masterfrom
chore/remove-blueprint

Conversation

@jumpinjackie

Copy link
Copy Markdown
Owner

Fixes #1450

Summary

Removes Blueprint.js as a UI dependency from mapguide-react-layout, completing the migration to the toolkit-agnostic IElementContext abstraction. The default (and now only) provider is MinimalProvider — a zero-dependency implementation using semantic HTML and CSS custom properties.

What changed

Dependencies removed

  • @blueprintjs/core — removed from devDependencies, peerDependencies, and peerDependenciesMeta
  • @blueprintjs/icons — removed from peerDependencies and peerDependenciesMeta
  • All Blueprint-related build configuration (BLUEPRINT_NAMESPACE define, iconSvgPaths aliases in Vite & Storybook)

Files deleted

  • src/components/elements/providers/blueprint/ (22 files) — the entire Blueprint provider
  • stdassets/bp-icons.js — SVG path subset (paths now embedded in minimal provider)

Visual parity improvements

  • Intent colors — updated to match Blueprint 3.x palette exactly (primary #137CBD, danger #DB3737, warning #D9822B, success #0F9960)
  • Input groups — height, line-height, and right-element padding adjusted to match Blueprint sizing
  • Right-element buttons — border-radius, padding, and positioning matched
  • Checkbox/radio — size increased to 16px with proper vertical alignment
  • Color expr editor — background color and contrast text now render on the input directly

Leaked bp3 classes cleaned up

  • src/styles/index.css — removed .bp3-select:after and .bp3-dark rules
  • src/containers/measure.tsxbp3-labelFormGroup element
  • viewer/css/limegold.css, viewer/css/turquoise-yellow.cssbp3-tab*mrl-tab*
  • Story files — bp3-headingHeading element

Naming sanitized

  • svg-icons.tsx: IBlueprintPathMapISvgPathMap, BP_ICONS_20SVG_ICON_PATHS_20, getBlueprintIconPathsgetSvgIconPaths
  • icon-map.ts: parameter blueprintNameiconName
  • Comments in neo-map-viewer.tsx, map-viewer-swipe.tsx, flyout-region.tsx — Blueprint references removed

Documentation updated

  • docs_dev/content/UI_CUSTOMIZATION.md — removed Blueprint provider section; updated reference link
  • docs_dev/content/README.md, README.md — removed Blueprint from credits
  • docs_dev/content/KNOWN_ISSUES.md — removed resolved Blueprint backdrop issue
  • docs_dev/content/VISUAL_REGRESSION.md — updated example text
  • src/stories/docs/common-elements.md — updated toolkit description
  • DONOTUPGRADE.md — updated decoupling note

Test comments updated

  • test/containers/add-manage-layers.spec.tsx
  • test/containers/selection-panel.spec.tsx

Breaking changes

None for end users. Blueprint was already an optional peer dependency and not included in the default viewer.js bundle. The MinimalProvider was already the default since 0.15.

Users who explicitly mounted the Blueprint provider in custom bundles will now fall through to MinimalProvider. They should remove the BpProvider import and Blueprint CSS imports from their custom entry points.

Manual testing plan

  1. Build with yarn run build:prod
  2. Load any viewer template against a MapGuide server — verify all UI renders correctly
  3. Test expression editors (String, Number, Boolean, Color, Slider) — verify alignment and color contrast
  4. Test input groups with right elements — verify button padding and border-radius
  5. Run yarn test:visual:update to regenerate baselines, then git diff visual-snapshots/ to review visual changes

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Report ✅ PASS

Metric Size Gzip Brotli
Total 8.78 MB 2.24 MB 1.77 MB
Diff -10.92 KB 🟢 ↓ -1.81 KB 🟢 ↓ -1.21 KB 🟢 ↓
Change -0.12% -0.08% -0.07%

Top Changes

File Before After Diff
~ vendor.js 92.31 KB 91.54 KB -780.00 B 🟢 ↓
~ vendor-debug.js 131.81 KB 131.38 KB -448.00 B 🟢 ↓
~ chunks/geotiff-codecs-debug.js 68.54 KB 68.85 KB +320.00 B 🔴 ↑
~ chunks/geotiff-codecs.js 58.67 KB 58.84 KB +176.00 B 🔴 ↑
~ viewer-debug.js 162.56 KB 162.40 KB -172.00 B 🟢 ↓

Generated by build-size-diff Commit: a0c85cd

@jumpinjackie
jumpinjackie merged commit c9dfce7 into master Jul 22, 2026
4 checks passed
@jumpinjackie
jumpinjackie deleted the chore/remove-blueprint branch July 22, 2026 10:25
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 61.081% (+1.0%) from 60.053% — chore/remove-blueprint into master

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.

Remove blueprint.js dependency

2 participants