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

Feature Request: Beer Menus shortcode has a new embed processs #91423

Closed
msilbers opened this issue Jun 3, 2024 · 10 comments
Closed

Feature Request: Beer Menus shortcode has a new embed processs #91423

msilbers opened this issue Jun 3, 2024 · 10 comments
Assignees
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". Shortcodes / Embeds [Type] Feature Request Feature requests

Comments

@msilbers
Copy link

msilbers commented Jun 3, 2024

What

WPcom has the option to embed menus from Beer Menus, as shown here: https://wordpress.com/support/wordpress-editor/blocks/shortcode-block/#miscellaneous
This embed option is built in, but the developers are changing how it works and have reached out to us to get it updated

Why

This is an existing shortcode that would need an update. I'm specifically listing it as a feature request because I cannot yet tell if the old way is actually broken.

How

The primary differences are that it uses a menu_id as a param instead of a bar_id and that it uses a web component to render the menu content.

You can see the JavaScript that inserts the new version here:
https://www.beermenus.com/web-menus.js

Quotes from the devs from this ticket: 8216240-zen
Some relevant details on p2: p58i-4gv-p2

@msilbers msilbers added the [Type] Feature Request Feature requests label Jun 3, 2024
Copy link

github-actions bot commented Jun 3, 2024

Support References

This comment is automatically generated. Please do not edit it.

  • 8216240-zen

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Jun 3, 2024
@msilbers msilbers added Shortcodes / Embeds and removed Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". labels Jun 3, 2024
@ericds
Copy link

ericds commented Jun 3, 2024

Hi @msilbers, the old version of the embed isn't broken, and we would like customers to be able to use the new version of the embed on wordpress.com in addition to the old version. I think ideally the shortcode would branch which JavaScript/HTML is loaded based on whether the param was a bar_id or menu_id. Please let me know if you have any other questions. Thanks!

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Jun 3, 2024
@daledupreez
Copy link
Contributor

@ericds, I would be happy to help with getting this done on the back end. Could you share a sample menu ID so I can test this out?

For reference, I am trying to get this out by generating the following HTML when a menu_id is present (I've used 1234 below):

<script src="https://www.beermenus.com/web-menus.js" type="text/javascript"></script>
<beermenus-web menu-id="1234"></beermenus-web>

However, I don't have a valid menu ID to work with, so the menu load/fetch is failing.

@daledupreez daledupreez self-assigned this Jun 10, 2024
@ericds
Copy link

ericds commented Jun 10, 2024

Thank you @daledupreez!

You can use this menu id: 33

And here's an example embed code for that menu id:

<beermenus-web menu-id="33">
  <p>Menu not loading? <a href="https://www.beermenus.com/web_menus/33">View here</a></p>
</beermenus-web>
<script type="module" src="https://www.beermenus.com/web-menus.js"></script>

Please let me know if you have any other questions.

@daledupreez
Copy link
Contributor

@ericds, I have the updates working in my dev environment, but the styling really doesn't look good on my test site, for both the older menu and for the newer one. Could you help confirm whether there are items we can fix on your side?

Also, as a broader comment, it might be simpler to define the embed via the oEmbed standard. I am not sure if that's something you've considered -- users only need to paste the correct link for the embed to work, and you get a link rendered as a fallback if the embed isn't supported. That would then be something you could offer for many different services, and have much clearer control over how the embed works.

Older shortcode

Screenshot 2024-06-13 at 20 08 24

You can see this rendered at https://ddptest.food.blog/2024/06/10/test-beermenus-shortcode/

Newer shortcode

Screenshot 2024-06-13 at 20 08 57

This isn't in production yet. I was testing with the test menu you mentioned above, menu ID 33, on the same link as above. In this case, it looks like the main issue stems from the inline CSS declaring background-color: ; for the #menu selector, which is being treated as transparent on my version of Chrome.

@ericds
Copy link

ericds commented Jun 13, 2024

Amazing, thanks @daledupreez!

I just set the background color to #fff on our end for that menu id, so the newer shortcode should look good now.

What are the next steps to get this in production?

We haven't dug deep into oEmbed, but it seemed more designed to embed a specific object (e.g. photo, video, etc.) vs. more complex HTML and CSS like our menus. That said we're going to take a deeper look and may explore that in the future.

Thanks again!

@daledupreez
Copy link
Contributor

For tracking purposes: internal change is in D151683-code.

@ericds
Copy link

ericds commented Jun 17, 2024

For tracking purposes: internal change is in D151683-code.

Thanks @daledupreez, does that mean it's live in production or will be soon?

@daledupreez
Copy link
Contributor

As a follow-up here, I deployed the changes to production a few minutes ago. I have also gone ahead and updated the examples in the shortcode documentation.

@ericds, it still looks like there may be some better defaults for the embeds, especially in terms of backgrounds, but feel free to ping me with any follow-up issues you find.

@ericds
Copy link

ericds commented Jul 16, 2024

@daledupreez thank you for shipping this! Everything has been working great. I'll let you know if we run into any issues in the future.

Customers set up the background color and other design settings on our end, and that's been working well so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". Shortcodes / Embeds [Type] Feature Request Feature requests
Projects
None yet
Development

No branches or pull requests

3 participants