This is useful in scenarios where the people you want to share the topic with is able to see your screen (i.e. quickly show the QR code on mobile). You can save the QR code, since it’s a HTML canvas element, by right clicking and saving to image.
Got a PR to core for a few new plugin outlets! Not sure if there’s any particular reason why the Sharing API isn’t being used in invites, so I’ll just keep the PR to plugin outlets.
I’m into this theme component! On my family forum, I have a category for howto procedures like how to keep my cat’s litter boxes clean. I was already thinking about printing out brief instructions to put by the litterboxes. That could have a QR code to the forum for the detailed instructions. I could create it elsewhere using the URL, but I like doing it directly in Discourse.
Interesting. Can you humor me and tell the epic tale for how this would be an improvement to the invite system? How and where would QR code invites be shared and how would they be accepted? Can you share prior art from other platforms to show how this is being done by others?Also, where do you envision the QR code being made available in the invite system?
You are using the new share link. That only grabs the URL for sharing with no modal. If you go to the post menu site settings you can enable the original sharing post menu item which would now also show the QR code. You can also click on the post timestamp to access the original sharing popup.
I never noticed that there was a sharing modal connected with the post timestamp! I have to admit, that is a nice place to tuck it, and the leaner sharing link does make sense for the most common uses.
Of note, my android phone (Pixel 7 Pro) automatically makes QR codes; this works with the invite modal too. And that is my major use-case. I never actually investigated this though. Ah, the voyage of discovery!
Is the QR code expensive to generate? If not, why not just have it display automatically on the sharing modal rather than requiring selecting a button to show it?
As @Jagster said, it’s not expensive to generate the QR code, it’s mostly down to personal taste on how focused and immediate the QR code is. The TC comfortably utilizes the Sharing API (and a bit of DOM manipulation) for displaying the QR Code, effectively treating it on the same level as the other sharing sources. This more or less matched my view of QR codes as a secondary method for sending information. However, since starting my vacation outside of the US, I am fairly shocked by how prevalent QR codes are in the physical world.
I could explore adding an immediate QR code option to the settings, but I would likely need to revisit how/where the QR code is placed. Honestly, the current placement of the QR code in the modal (both in desktop and mobile view) is really shoehorned in with DOM manipulation. Ideally, in a desktop view, a QR code treated at the same level as the “copy link” button would occupy the entire right side of the modal, but that would need a new plugin outlet and a good helping of CSS changes. Currently there’s only one plugin outlet in the sharing modal, and its right next to the “New Topic” button, and I really want to avoid making a complex CSS or use more DOM manipulation.
tl;dr: I’ll think on it more and decide on if adding the immediate QR code setting is worth extra effort after I get back from the holidays.