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

How do we want to handle page titles? #1212

Open
stevepolitodesign opened this issue Jun 6, 2024 · 2 comments
Open

How do we want to handle page titles? #1212

stevepolitodesign opened this issue Jun 6, 2024 · 2 comments
Labels
Discussion Needs feedback

Comments

@stevepolitodesign
Copy link
Contributor

We currently rely on title to generate the <title>. However, with the introduction of rails/rails#49702, do we still feel we need this dependency?

If we want to continue using title, I think we'll need to ensure the existing regex still works.

@stevepolitodesign stevepolitodesign added the Discussion Needs feedback label Jun 7, 2024
@louis-antonopoulos
Copy link
Contributor

If Suspenders continues using the Title gem, it would be helpful for the app to add the titles/application keys to en.yml so that the user knows where that value is coming from, as demonstrated in the Title README.

Without the keys in en.yml, Title defaults to something (possibly the project name), and the string value is not searchable in the project to know where to change it. You have to look at the application layout, see the title reference, then notice that title is in the Gemfile, then read their README to figure out how to set it.

Suggested addition:

en:
  hello: 'Hello world'
  titles:
    application: Hello World

@stevepolitodesign Do you think a separate issue about this would be helpful, or is it better to keep it contained here for the moment until we decide whether or not to use Title?

@stevepolitodesign
Copy link
Contributor Author

I personally think that in the spirit of keeping Suspenders as close to rails new as possible, we should remove our dependency on title.

Let's see what others have to say, and if we find that we want to keep our dependency with title, then we can close this issue and open a new one with your suggested improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Needs feedback
Projects
None yet
Development

No branches or pull requests

2 participants