Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple blocks on the same page #175

Merged
merged 11 commits into from
Feb 2, 2023
Merged

Multiple blocks on the same page #175

merged 11 commits into from
Feb 2, 2023

Conversation

psrpinto
Copy link
Member

@psrpinto psrpinto commented Jan 27, 2023

This PR makes it possible to have multiple blocks on the same page, by removing reliance on div ids, and by passing block attributes through a data-attribute, instead of through inline javascript.

When multiple blocks are on the same page, the behaviour is similar to having one page with a single block open in multiple tabs: opening a session in one of the blocks, closes it on all other blocks on the page.

This is the first step to address #159

@psrpinto psrpinto self-assigned this Jan 27, 2023
@psrpinto psrpinto marked this pull request as ready for review January 27, 2023 14:20
@psrpinto psrpinto requested review from ashfame and akirk January 27, 2023 14:20
@psrpinto psrpinto added this to the 0.6 milestone Jan 27, 2023
Copy link
Member

@ashfame ashfame left a comment

Choose a reason for hiding this comment

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

Looks good 👍

src/Block/block.php Outdated Show resolved Hide resolved
frontend/app.ts Outdated Show resolved Hide resolved
@psrpinto psrpinto requested a review from ashfame February 1, 2023 14:02
Copy link
Member

@ashfame ashfame left a comment

Choose a reason for hiding this comment

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

🚀

@psrpinto psrpinto merged commit 1689f52 into main Feb 2, 2023
@psrpinto psrpinto deleted the multiple-blocks branch February 2, 2023 13:05
@ashfame ashfame mentioned this pull request Feb 14, 2023
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.

2 participants