-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
(936) Fix weird entries in the change history #9995
Merged
pezholio
merged 6 commits into
main
from
content-modelling/936-weird-entries-in-the-change-history
Feb 27, 2025
Merged
(936) Fix weird entries in the change history #9995
pezholio
merged 6 commits into
main
from
content-modelling/936-weird-entries-in-the-change-history
Feb 27, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c12ccd8
to
e6750c8
Compare
e6750c8
to
53c621e
Compare
Harriethw
reviewed
Feb 27, 2025
lib/engines/content_block_manager/app/models/content_block_manager/content_block/version.rb
Outdated
Show resolved
Hide resolved
Harriethw
reviewed
Feb 27, 2025
...ntent_block_manager/content_block/document/show/document_timeline/timeline_item_component.rb
Outdated
Show resolved
Hide resolved
549048b
to
60c696a
Compare
Harriethw
reviewed
Feb 27, 2025
@@ -10,6 +10,10 @@ class Version < ApplicationRecord | |||
def field_diffs | |||
self[:field_diffs] ? ContentBlock::DiffItem.from_hash(self[:field_diffs]) : {} | |||
end | |||
|
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.
is this a stray method left over from a refactor?
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.
Whoops, yes!
This will allow us to capture additional information about an when an embedded object has been created.
This adds a virutal field to allow us to pass information about an event to a version.
60c696a
to
5a69782
Compare
This checks for the presence of the relevant event details, which we can then use to generate the history in the next commit
5a69782
to
c253925
Compare
Harriethw
approved these changes
Feb 27, 2025
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trello card: https://trello.com/c/gW7ssapF/936-weird-entries-in-the-change-history
This ensures that when we clone an edition, we don't copy the change notes, as well as updating the history when adding a new embedded object
Screenshot