-
Notifications
You must be signed in to change notification settings - Fork 151
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
Updating Meta Tags #176
Comments
Hi @AnnMarieW, thanks very much for the suggestion and the offer to raise a PR 🙏 It's been on my list for a while to check what other things we could set on I do have a few hesitations about adding this feature right away though:
So let me check with our project manager @Joseph-Perkins where things stand on the above and get back to you! A couple of questions for you if you don't mind!
|
Hi @antonymilne and thanks for your response. The icons, logos, images and descriptions used in the layout may not be ideal for the meta tags. The Related to #70 -- in the next release of Dash Bootstrap Components, you will be able to put icons (or any Dash component) in the Accordion title. This means you won't need the limitation of including icons only in the Having unique meta tags for every page is an advanced (and very cool!) feature, however you can use the same image and description for every page if you like. Simply include an image file named "logo" or "app" in the assets folder. To add the same description to every page, you can loop through the There is no good reason why Re the I have some other general Vizro design questions, but they aren't "issues". Is it OK to ask them here, or do you prefer some other channel? |
Thanks for all the answers @AnnMarieW! That's very nice to know about the I had a good chat with @Joseph-Perkins about all this yesterday. What you say makes a lot of sense and we're keen to go ahead with enabling the functionality, but I'd just like to give a bit more thought about how exactly we handle it in a way that plays nicely with our existing plans to enable a dashboard logo. So please hold off on the PR just for now and I will get back to you very soon if that's ok! 🙏 Very happy to discuss Vizro design questions and anything else more generally - let me send you a message on the plotly forums and we can figure out the best way to be in touch. |
I'm happy to help any time it fits with your development plan. :-) |
I've thought about this all some more and here's what I think we should do 🙂
So if you'd like to raise a PR then please go for it @AnnMarieW! I'll be more than happy to support, answer questions, help with tests, review, etc. - whatever you like. No need to put all of it in one PR if you'd prefer to do the docs separately or just leave that to someone else and make only the code changes - completely up to you. If you'd like to understand more context around why I suggest the above, I can definitely explain more - it's all to do with the architecture of Vizro and what level the interface should be. This currently isn't spelt out very clearly anywhere other than my head so I appreciate it might be a bit mysterious without further explanation 😅 Known limitations that are all deliberate and could potentially be relaxed in future if there's demand for it, but not now:
Known limitation that I would like to lift, but not a big problem: images are only picked up if they're at the root of the
Near future changes:
In fact, I just realised we'll need a function like Not so near future changes:
|
I'd be delighted to do the PR for both the code changes and the docs. 🙂
This would be the ideal solution, but I'm concerned that it would be considered a breaking change. I'll check with Plotly and if they approve, I could do a PR in Dash. Otherwise, I could add it to Vizro if you like.
I have a utility that takes a snapshot of each page using Selenium. If that's what you have in mind, I can share that with you when you're ready for a fun little project. There is now a feature request in Dash for app level description and image to make it easier to create Meta Tags. |
Amazing, thank you! Our contributing guidelines is pretty thorough but may be slightly out of date in places. I'm not sure anyone external has tried following it in detail before, so I'll be very interested in any feedback you have on any aspect the contribution process. One thing that's not mentioned there that will be useful if you're modifying docs:
Cool, let me know what they say. Though I realised that we'll need to write our own version of
Yeah, that's the sort of thing I had in mind! We have something similar for running QA tests though I don't know the details of it. Ideally I think we'd take a screenshot of just the main content of the page (so not including the navigation), maybe doing something like this? I'm not very familiar with Selenium but my impression is that it might be a bit too heavyweight/awkward for general users to setup (installing chromedriver doesn't seem trivial for a start, but it's very possible that I just don't know what I'm doing). Some possible alternatives (never used any of them) might be:
Nice! Let me leave a comment there. |
I opened an issue in Dash for the recursive search for the image files. While it may not be considered a breaking change, I'm not sure if this should be added to Pages. There are several options that could work well with Vizro. Specifying the image to use for the meta tags in the |
Just a small note that plotly/dash#2826, released in Dash 2.17, adds a If we did add a Currently |
What's the problem this feature will solve?
One of the cool features of Dash Pages is that it’s easy to update the meta tags for each page. This is good for SEO and creating nice looking preview cards when sharing a link on social media.
Currently with the Vizro demo app, only the title is included in the meta tags. Here's what the link preview looks like:
![vizro_on_forum](https://private-user-images.githubusercontent.com/72614349/283865880-a791971c-59e3-4ced-9222-dc410e90e493.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4NjA5ODAsIm5iZiI6MTczODg2MDY4MCwicGF0aCI6Ii83MjYxNDM0OS8yODM4NjU4ODAtYTc5MTk3MWMtNTllMy00Y2VkLTkyMjItZGM0MTBlOTBlNDkzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDE2NTEyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc0NjFmMjZjZTYzOWNlZGM5MDM3YmY0NGZiMjg1ODM1ODhmZmQ5ODgwMGIyZTRjY2FiNmQ1MzEwZGIyNzZkYmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.iylzhmyJw0eRLoDgLoKXo884fhzZUpGni-9gcEQKHmY)
However, Dash Pages will update the meta tags with an image and description if supplied. For example, see the Dash Example Index. It has over 100 pages, each with it's own title, description and image:
Describe the solution you'd like
It's easy to enable this feature in Vizro. Simple include (an optional)
description
,image
, andimage_url
parameter in thePage
.I could do a pull request if you would like this feature enabled. I got it working locally. You can't see what the link looks like until the app is deployed , but when inspecting the browser, you can see that the meta tags now include an image and description.
Alternative Solutions
No
Additional context
None at this time.
Code of Conduct
The text was updated successfully, but these errors were encountered: