-
Notifications
You must be signed in to change notification settings - Fork 7
feat: document resource type #1127
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
Open
michael-johnston
wants to merge
24
commits into
main
Choose a base branch
from
maj_document
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
6d6ed75
feat(core): document resource
michael-johnston 4f42a37
test(document): additional tests
michael-johnston 2aebbf2
feat(core): document resource
michael-johnston a65059e
test(core): fixtures for document testing
michael-johnston 4809775
Merge remote-tracking branch 'origin/main' into maj_document
michael-johnston d01c41a
Merge remote-tracking branch 'origin/main' into maj_document
michael-johnston 46f347c
fix(core): remove attachments features
michael-johnston 95f6f47
Merge remote-tracking branch 'origin/main' into maj_document
michael-johnston 46efbcb
docs: update
michael-johnston a479040
docs: update
michael-johnston 036a9bb
chore: changes for code review
michael-johnston d47738e
feat(core): add contentType field
michael-johnston d909784
feat(core): add contentType field
michael-johnston 6f1109f
feat(core): enable ado describe document
michael-johnston b824fa8
fix: missing commits
michael-johnston 0c13724
fix: missing fixture
michael-johnston 2293733
chore: remove function
michael-johnston 0300a28
chore: remove printing content type
michael-johnston f02b76c
fix: typing
michael-johnston d2c1cf1
fix: revert prior change
michael-johnston 2840849
fix: branch on isatty
michael-johnston 5ea48f9
fix: tests
michael-johnston 1e94d44
Merge remote-tracking branch 'origin/main' into maj_document
michael-johnston b1c6a4b
fix: typing
michael-johnston File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
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.
Maybe before adding documents we could implement #376 and remove this field, since we already have a related resources table that has this exact purpose anyway.
This, however, would mean that we wouldn't be able to just retrieve the resource if we want to display this information, we would also have to lookup the related resources table
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.
The thing if its not there how on create do we know the resources the report is related to? :-)
This field is the same as
spacesin operation yaml orsamplestorein space yamlThere 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.
that's true - we should add some kind of mechanism to ensure this field doesn't become stale, though
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.
How does it become stale
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.
If a new operation/space/whatever becomes related to the report and it's either:
relatedResourcesfieldresources_relationshiptableThere 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.
This is already a possibility, and has to be handled by a convention. There is no way to validate that whatever is in the field (string of text) is actually related to what is written or not.
So for reports that are on an operation/space - we assume who ever writes the report will put the correct resource ids. We can't edit this afterwards as of this PR - but it is tied to single resource ids anyway, so can't become stale in the sense you say.
For report that are on a project, adding every single resource in the project to the related resources seems overkill, although nothing stopping anyone. For project reports the date of the report and the date of the resources is enough to tell you what was present when it was written.
For a document which is about future to-be-created spaces/operations etc. (a study) there is nothing to add on creation (usually) and the related resources can't be edited. With the current capabilities of document we would rely on a convention, that would be to define labels.