Set window title to filePage metadata title #408

Closed
akinwale wants to merge 1 commit from ui-filepage-title into master
akinwale commented 2017-07-30 18:01:11 +02:00 (Migrated from github.com)

Currently, the window title is set to the item's lbry URL after opening a media item. This updates the title in the componentDidMount method if metadata is present.

Currently, the window title is set to the item's lbry URL after opening a media item. This updates the title in the `componentDidMount` method if metadata is present.
kauffj commented 2017-07-30 22:29:16 +02:00 (Migrated from github.com)

I don't like this change because it introduces two different ways titles get set. And I don't think document.title directly inside of components is a "React" way of doing things (for one, it relies on lifecycle components, when the trend is towards stateless).

Maybe a pattern like this if you wanted to refactor? https://stackoverflow.com/a/26266720/82124

But I haven't thought about this or researched this for very long.

Either way, I'm going to decline this as-is.

I don't like this change because it introduces two different ways titles get set. And I don't think document.title directly inside of components is a "React" way of doing things (for one, it relies on lifecycle components, when the trend is towards stateless). Maybe a pattern like this if you wanted to refactor? https://stackoverflow.com/a/26266720/82124 But I haven't thought about this or researched this for very long. Either way, I'm going to decline this as-is.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#408
No description provided.