-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix/merge wiki content into page #12333
Conversation
a8b6a17
to
95cb662
Compare
95cb662
to
56dcb1e
Compare
56dcb1e
to
a328940
Compare
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.
Looks like a nice refactoring on the wiki pages, congrats @ulferts !🎉
I left a few findings with screenshots.
dcecda8
to
67d3c98
Compare
This is done, so former versions can be rolled back to. The transformation of the view object to it`s wrapped model needs to be prevented. Once that had been achieved more indirections via content were removable.
67d3c98
to
b22be95
Compare
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.
LGTM! 🎉
Feel free to merge once CI is green.
@ulferts In attempting to upgrade our instance to 13, we're getting
during the (When trying to google this problem I came across an old PR that may or may not be relevant: #9598) |
Apologies, I see this is likely fixed with 1a640c2 already. EDIT: Actually no, that commit is in v13.0.0, so that's not a fix, or the fix is not working somehow. |
Merges the WikiContent model into the WikiPage model. Presumably, the two were separate to support multiple text version of the same page but that reason was no longer relevant with the introduction of the journals. Nowadays, having the two separated does not grant any benefits while increasing complexity.
https://community.openproject.org/projects/openproject/work_packages/32796
The PR does not attempt to alter the behaviour of application in any way.
For the most part, the changes are just the removals of indirections (referencing the wiki page instead of the wiki page's content). In the frontend however a specific view object (
WikiPages::AtVersion
) has been introduced. Some views, most notably the show pages allow for browsing through different versions of the text. Instead of having multiple objects referenced in the view, theWikiPages::AtVersion
object is passed, representing a wiki page at the version requested by the user. Since this affects the whole page, using ViewComponents has not seemed like an appropriate fit. There is no other view component as of now yet which is why the class is placed underapp/helpers
.Limitations existing before have been kept. E.g. the journals only cover changes in the text and not in the title or the parent page. The
author
field existing both in the page (used to be content) as well as in the journal has also been kept. They arguable are unnecessary since the user reference is kept in the journal anyway.TODO