Skip to content

Add support for the progress bar.#90

Open
bhubbard wants to merge 6 commits intortCamp:developfrom
bhubbard:88-progress-bar-block
Open

Add support for the progress bar.#90
bhubbard wants to merge 6 commits intortCamp:developfrom
bhubbard:88-progress-bar-block

Conversation

@bhubbard
Copy link
Copy Markdown
Contributor

This would support issue #88 - Add support for progress bar.

This would support issue rtCamp#88 - Add support for progress bar.
@theMasudRana theMasudRana self-assigned this Mar 26, 2026
theMasudRana
theMasudRana previously approved these changes Mar 26, 2026
Copy link
Copy Markdown
Collaborator

@theMasudRana theMasudRana left a comment

Choose a reason for hiding this comment

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

The progress bar implementation was great.
I updated the implementation to make it work on the editor and address some accessibility issues for consistency.

Everything works as expected—approved!

cc: @bhubbard @danish17

Copy link
Copy Markdown
Contributor

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

Adds a new “Carousel Progress” inner block to Carousel Kit and wires it to Embla’s scroll progress so the editor and frontend can render a progress bar similar to carousel dots.

Changes:

  • Introduces a new carousel-kit/carousel-progress block (block.json, edit/save, styles).
  • Tracks scrollProgress from Embla in both the frontend interactivity store and the editor context.
  • Registers the new block server-side for discovery/loading.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/blocks/carousel/view.ts Adds a progress-bar style callback and updates scrollProgress from Embla events.
src/blocks/carousel/types.ts Extends carousel types to include progress block attributes and scrollProgress in CarouselContext.
src/blocks/carousel/progress/style.scss Adds frontend styling for the progress bar.
src/blocks/carousel/progress/save.tsx Adds frontend markup wired to interactivity callbacks.
src/blocks/carousel/progress/edit.tsx Adds editor rendering using EditorCarouselContext.
src/blocks/carousel/progress/index.ts Registers the new progress block.
src/blocks/carousel/progress/block.json Declares the new progress block metadata.
src/blocks/carousel/editor-context.ts Adds scrollProgress to the editor carousel context.
src/blocks/carousel/edit.tsx Subscribes to Embla events to keep editor scrollProgress updated.
inc/Plugin.php Registers the new carousel/progress block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@milindmore22 milindmore22 left a comment

Choose a reason for hiding this comment

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

Can improved with inline code comments, but overall looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants