-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Update title of page in editor to current title of post. #1072
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Neatoro 👋 Thanks for looking at this! I think this approach needs a bit of a rethink, we already have a system in place for working with titles that can be used for this case. There are also a few changes needed to make use of the tools Ember provides rather than reaching out for external dependencies.
@kevinansfield I tried to implement you requested changes, hope they look better now :) If you wonder I forced pushed on my branch to rebase the review comment commits into the same. |
Seems like the tests are failing for some reason 🤔 I checked by triggering my own repo against travis and there different tests and a different amount are failing. (https://travis-ci.org/Neatoro/Ghost-Admin/builds/454706025) Are they unstable or do I miss something here? |
I think I found the issue regarding the failing tests. Somehow he has problems with the router. I need to figure out how to fix them hopefully within the next hours. |
Fixed the failing test. @kevinansfield could you review it again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented the code review followups
refs #10088 Change moved the title information into a function that returns the correct title or if no title is set for now "Editor". That should help with multiple Editor tabs open.
refs #1072 Changed the logic to use the route object of the controller. Afterwards overwrote the route object in the tests to use a stubbed version. Added an unit tests that verifies that the updateTitle method is called.
…tle` observer method
Thanks @Neatoro. I've pushed changes to your branch so that I can merge 😄 |
@kevinansfield Thank you! |
refs TryGhost/Ghost#10088
The change moved the title information into a function that returns the
correct title or if no title is set for now "Editor" for the editor route. That should help
with multiple Editor tabs open since it now displays the correct title.
Before:
![47715178-8bd1d580-dc71-11e8-9aa8-e239736225cc](https://user-images.githubusercontent.com/1591511/48420532-ed5a6f80-e75a-11e8-9e76-6810a84e1028.png)
After:
![screenshot 2018-11-13 at 15 43 42](https://user-images.githubusercontent.com/1591511/48420538-f2b7ba00-e75a-11e8-8165-db044a3f18d2.png)
Got some code for us? Awesome 🎊!
Please include a description of your change & check your PR against this list, thanks!
ember test
from the repo root - will becore/client
if working from the submodule in Ghost).