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

#6065: fix rendering of user-defined bricks in the sidebar #6067

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

twschiller
Copy link
Contributor

@twschiller twschiller commented Jul 12, 2023

What does this PR do?

Reviewer Tips

  • Review changes in brickFactory.ts
  • Modifies runEffectPipeline to runHeadlessPipeline and has it return it's value

Discussion

Demos

Added directly to sidebar:
image

Embedded in Document Builder:
image

Referencing a @mod variable inside of the user-defined brick:
image

Future Work

Post-Merge Actions

  • Update the Rainforest test to double-check the user-defined social links brick in the AI Copilot mod are rendered properly

Checklist

  • Add tests: updated, but see above on Rainforest
  • Designate a primary reviewer: @grahamlangford

@twschiller twschiller changed the title #6065: fix rendering of user-defined bricks #6065: fix rendering of user-defined bricks in the sidebar Jul 12, 2023
@twschiller twschiller added this to the 1.7.34 milestone Jul 12, 2023
@twschiller twschiller added release blocker bug Something isn't working labels Jul 12, 2023
@twschiller twschiller requested a review from turbochef July 12, 2023 11:15
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #6067 (0e3cff4) into main (49e52e0) will decrease coverage by 0.02%.
The diff coverage is 54.54%.

@@            Coverage Diff             @@
##             main    #6067      +/-   ##
==========================================
- Coverage   67.99%   67.98%   -0.02%     
==========================================
  Files        1105     1105              
  Lines       34556    34580      +24     
  Branches     6520     6523       +3     
==========================================
+ Hits        23497    23509      +12     
- Misses      11059    11071      +12     
Impacted Files Coverage Δ
src/blocks/errors.ts 75.00% <ø> (ø)
src/contentScript/messenger/registration.ts 0.00% <ø> (ø)
src/contentScript/pipelineProtocol.ts 0.00% <0.00%> (ø)
src/sidebar/PanelBody.tsx 82.89% <ø> (ø)
src/types/runtimeTypes.ts 20.00% <0.00%> (-80.00%) ⬇️
src/blocks/transformers/brickFactory.ts 75.72% <60.00%> (-4.51%) ⬇️
...omponents/documentBuilder/render/ButtonElement.tsx 87.09% <100.00%> (ø)
src/contentScript/messenger/api.ts 100.00% <100.00%> (ø)
src/runtime/reducePipeline.ts 85.65% <100.00%> (+0.06%) ⬆️
src/testUtils/detectPageMock.ts 57.89% <100.00%> (+4.95%) ⬆️

@@ -160,8 +160,7 @@ const PanelBody: React.FunctionComponent<{
console.debug("Running panel body for panel payload", payload);

const block = await blockRegistry.lookup(blockId);
// In the future, the renderer brick should run in the contentScript, not the panel frame
// TODO: https://github.com/pixiebrix/pixiebrix-extension/issues/1939
Copy link
Collaborator

Choose a reason for hiding this comment

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

This issue should be safe to close once this PR is merged, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we can close #1939 once we merge in this PR

@github-actions
Copy link

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@twschiller twschiller merged commit 8fe6c46 into main Jul 12, 2023
@twschiller twschiller deleted the feature/6065-user-defined-brick-render branch July 12, 2023 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release blocker
2 participants