Skip to content

Switch to importmap and replace tranzito_utils with binxtils#125

Merged
sethherr merged 7 commits intomainfrom
sethherr/importmap-binxtils
Apr 17, 2026
Merged

Switch to importmap and replace tranzito_utils with binxtils#125
sethherr merged 7 commits intomainfrom
sethherr/importmap-binxtils

Conversation

@sethherr
Copy link
Copy Markdown
Member

@sethherr sethherr commented Apr 14, 2026

  • Replace esbuild/jsbundling with importmap-rails, pinning JS dependencies to CDN URLs instead of bundling from node_modules
  • Replace tranzito_utils gem with binxtils, extracting SetPeriod and SortableTable as local concerns and inlining helper methods (in_admin?, current_page_active?, admin_number_display, sortable, etc.)
  • Replace custom time_parser.js (moment-timezone) with @bikeindex/time-localizer
  • Convert gem-provided HAML partials (pagination, period_select) to local ERB versions
  • Remove esbuild config, RenderEsbuildErrors concern, log.js, Jest test setup, and flowbite dependency

sethherr and others added 7 commits April 14, 2026 08:56
Replace esbuild/jsbundling with importmap-rails for JS module loading.
Pin dependencies to CDN URLs instead of bundling from node_modules.
Replace tranzito_utils gem with binxtils, extracting SetPeriod and
SortableTable as local concerns. Replace custom time_parser.js with
@bikeindex/time-localizer. Convert gem-provided HAML partials
(pagination, period_select) to local ERB versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add missing en.time.formats.convert_time locale (was provided by
  tranzito_utils engine)
- Fix sortable helper: use **kwargs for proper keyword arg routing,
  add defensive fallback when sort_column is unavailable
- Include SortableHelper in ApplicationHelper (needed for sortable_params)
- Fix lint: rescue StandardError -> rescue
- Fix helper spec: add path to request double

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The @bikeindex/time-localizer package imports luxon, but it wasn't
pinned in the importmap. This caused a cascading module load failure
that prevented all Stimulus controllers from connecting, breaking
modal and dropdown system specs. Also fix 3 StandardRB lint issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…restore JS comments

- Replace kaminari gem with pagy for pagination
- Update all controllers to use pagy(:offset) instead of .page().per()
- Rewrite _pagination partial to use UI::Pagination component
- Add pagy initializer matching rails_template config
- Replace convertTime/convert_time with localizeTime/localize_time across all views
- Remove convert_time locale entry (use localize_time format instead)
- Restore comments and logging removed during importmap migration
- Enable pagination component specs now that pagy is available

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Upgrade @bikeindex/time-localizer from 0.1.1 to 0.2.0 which bundles
  luxon internally, removing the need for a separate luxon pin
- Fix malformed CSS comment in tables.css

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The entry point moved from /index.js to /dist/index.js in v0.2.0,
causing a 404 that broke all JS module loading in CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace local SetPeriod and SortableTable concerns with Binxtils::SetPeriod
and Binxtils::SortableTable from the gem. Rewrite SortableHelper to extend
Binxtils::SortableHelper with app-specific search keys and overrides.
Configure default_earliest_time in ApplicationController.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sethherr sethherr merged commit 5a61024 into main Apr 17, 2026
2 checks passed
@sethherr sethherr deleted the sethherr/importmap-binxtils branch April 17, 2026 04:06
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