Skip to content

feat(core): rename title to page title with a deprecation period - #257

Merged
vs-borodin merged 1 commit into
signalityjs:mainfrom
amirhosseinfaraji:feat/rename-title-to-page-title
Aug 30, 2026
Merged

feat(core): rename title to page title with a deprecation period#257
vs-borodin merged 1 commit into
signalityjs:mainfrom
amirhosseinfaraji:feat/rename-title-to-page-title

Conversation

@amirhosseinfaraji

Copy link
Copy Markdown
Contributor

Closes: #255

Summary

Renames title() to pageTitle(). The old name still works, it's just deprecated now.
As the issue says, title doesn't tell you which title you're getting. In one component you can easily have the route title, a webShare title and the document title in scope at the same time, and readonly title = title() isn't nice to read.

What changed

Added @signality/core/router/page-title with pageTitle() and PageTitleOptions.

@signality/core/router/title is still there and still exported from the router barrel. It just calls pageTitle() now, and both title() and TitleOptions got @deprecated ... Will be removed in 1.0. I used the same wording as OnKeyOptions.passive, so it stays consistent.

For the docs: new page at /router/page-title, and the sidebar points there. I kept the old /router/title page with a deprecation notice instead of deleting it, so old links don't 404. I also fixed two webShare examples that had readonly title = title() in them, which is exactly the confusing case from the issue.

Checklist

  • Tests added/updated
  • Documentation updated (if applicable)
  • Follows existing code style and patterns

Breaking changes

None. Both old names keep working until 1.0. Migration is just a rename:

// before
import { title } from '@signality/core';
readonly pageTitle = title();

// after
import { pageTitle } from '@signality/core';
readonly title = pageTitle();

@vs-borodin vs-borodin added this to the v0.5.1 milestone Aug 30, 2026
@vs-borodin
vs-borodin self-requested a review August 30, 2026 17:06
@vs-borodin
vs-borodin merged commit ca2da65 into signalityjs:main Aug 30, 2026
4 checks passed
@vs-borodin

Copy link
Copy Markdown
Contributor

Thanks for jumping in! 🚀 @amirhosseinfaraji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename title to pageTitle

2 participants