Display the dialogue title in the <title> tag #25
CNSeniorious000
started this conversation in
Ideas
Replies: 1 comment
-
Nice try, I think using createEffect should be a good way to go for now. Feel free to create a PR if you like. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think it is possible to display the conversation title in the <title> tag, similar to what is done on official websites. Here is an example of what I have implemented myself:
However, due to the complexity of the file directory in this project, I have not determined the most appropriate location to add this logic.
On the other hand, modifying document.title in createEffect may not be the most appropriate way to change the title. Compared to SolidJS, I am more familiar with Svelte. In a Svelte application, I may create a svelte:head block in the Layout file which contains a <title> tag, and then use a store to set it globally.
However, upon reflection, isn't document.title itself similar to a store? Perhaps more encapsulation is not appropriate. What do you think about this?
appendix: screenshots of results of my implementation
Beta Was this translation helpful? Give feedback.
All reactions