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

fix/3109 query loop class #3298

Merged
merged 3 commits into from
Sep 5, 2024
Merged

fix/3109 query loop class #3298

merged 3 commits into from
Sep 5, 2024

Conversation

Arukuen
Copy link
Contributor

@Arukuen Arukuen commented Aug 21, 2024

fixes #3109

Note that the issue is also arises in the Horizontal Scroller Block.

  • The class of blocks for styling in the editor looks like this: stk-abc1234
    • For blocks inside Query Loop, instanceId is added like this: stk-abc1234-1, stk-abc1234-2, etc.
    • These are targeted properly in the BlockCSS (found in style tag) providing styles in the editor
  • However, for Columns and Horizontal Scroller Block, the targeted class (found in style tag) for styling looks like this respectively: stk-abc1234-column and stk-abc1234-horizontal-scroller
    • If inside Query Loop, instanceId is added like this: stk-abc1234-1-column, stk-abc1234-2-column, etc.
    • However, instanceId is not considered in generating the class (implemented via getContentAlignmentClasses).
    • Solution is to add appropriate instanceId to the generated class.

Copy link

github-actions bot commented Aug 21, 2024

🤖 Pull request artifacts

file commit
pr3298-stackable-3298-merge.zip e6ad419

github-actions bot added a commit that referenced this pull request Aug 21, 2024
Copy link
Contributor

@bfintal bfintal left a comment

Choose a reason for hiding this comment

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

  1. The change to the function argument arrangement will cause issues since the function is currently used. Please use a different arrangement:
- getContentAlignmentClasses = ( attributes, instanceId, blockName = 'column' )
+ getContentAlignmentClasses = ( attributes,  blockName = 'column', instanceId = '' )
  1. A question, I see changes only for the editor, does the issue only exist in the editor?

@Arukuen
Copy link
Contributor Author

Arukuen commented Aug 27, 2024

Apparently, class names in the frontend do not use the same class appended with the instanceId, but instead are unique from each other.

Editor:
361630704-cf0c8681-3d77-4b68-982b-7eeb264b89f2
image

Frontend:
Untitled

github-actions bot added a commit that referenced this pull request Aug 27, 2024
@bfintal
Copy link
Contributor

bfintal commented Aug 28, 2024

@andeng1106 Will need to test:

  • Block updating / deprecation
  • Works in backend & frontend

@bfintal bfintal merged commit 224a9b0 into develop Sep 5, 2024
1 of 6 checks passed
@bfintal bfintal deleted the fix/3109-query-loop-class branch September 5, 2024 06:44
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.

Some Columns block settings aren't working properly if Columns block is inside Query Loop block
2 participants