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

[WIP] Gutenberg block for the [jobs] shortcode using Server-Side Rendering #1545

Closed
wants to merge 14 commits into from

Conversation

alexsanford
Copy link
Contributor

This is an iteration on #1521 to explore Server-Side Rendering as a more useful method for directly wrapping blocks around shortcodes (see #1521 (comment) for a bit more context).

This is not yet feature-complete, as there were a few technical hurdles to overcome in order to get this to work, specifically around getting the shortcode's JavaScript working within Gutenberg (so it would display the correct content). This was done by wrapping the jQuery functionality in a function that supplied a parent element's ID, only attaching handlers to elements within that parent, and rerunning whenever the block is added.

Issues

For the most part, all that is needed is to finish the remainder of the UI for editing attributes. However, there is also an issue with extensions that modify the UI of the shortcode. To see this, install and activate the Job Tags extension, create some tags, and view this block within Gutenberg. The Job Tags JavaScript is not run properly, and so the tags do not show up.

Testing

  • Install Gutenberg

  • Go to a Post and add the Jobs block.

  • Change some attributes in the Edit UI and save the post.

  • View the post on the frontend to ensure it is rendering the shortcode correctly.

@alexsanford alexsanford self-assigned this Jul 18, 2018
@jom jom marked this pull request as draft December 16, 2020 14:22
@alexsanford alexsanford closed this Dec 5, 2022
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