slovnicki / beamer

A routing package built on top of Router and Navigator's pages API, supporting arbitrary nested navigation, guards and more.
MIT License
591 stars 129 forks source link

Update Browser title independent from rebuild. #668

Open fabianbrandscheid opened 4 months ago

fabianbrandscheid commented 4 months ago

Follow up PR from this: https://github.com/slovnicki/beamer/pull/652 because issue still exists.

fabianbrandscheid commented 4 months ago

@slovnicki Can you take a look at the PR, when you find some time? :)

stan-at-work commented 4 months ago

LGTM ✅

slovnicki commented 4 months ago

Hey @fabianbrandscheid :wave: Thank for the PR!

I see some issues, will look into it later today or tomorrow.

fabianbrandscheid commented 4 months ago

@slovnicki Thank you!

When you need some help, feel free to contact me :)

slovnicki commented 2 weeks ago

@fabianbrandscheid I now fully understand the need for this functionality. I've been able to create a use case where we need to update browser title and there is no other way except having html.document.title = title; in one's project.

The use case is when we are doing Beamer.of(context).update(... rebuild: false). Route information (URL) is updated correctly, but browser title not because it gets called only during build (which is a mistake).

This tells me we should call setTabTitle inupdateand not inbuild` so I would rewrite this PR differently. Let me know if you're ok with me closing this and we can open a new one.