Skip to content
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

HM24 Proto Definition Concepts #1711

Merged
merged 5 commits into from
Jun 21, 2024
Merged

HM24 Proto Definition Concepts #1711

merged 5 commits into from
Jun 21, 2024

Conversation

ericvicenti
Copy link
Collaborator

Here are some ideas on how the new document entity can be augmented. This is still a WIP, but it is enough to start the discussion

string document_id = 2;

// the path of the document which is being updated. may include slashes to represent a deep index
string path = 3;
Copy link
Collaborator

@burdiyan burdiyan Jun 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericvicenti

Do we allow paths to have slashes? I thought we wanted to represent deep hierarchies with multiple documents and their corresponding indexes?

Can an index entry for a single document have slashes?

Copy link
Collaborator Author

@ericvicenti ericvicenti Jun 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in my understanding, index key may not contain slashes.

when you use a path with a slash, you refer to the index of an index

Copy link
Collaborator

@burdiyan burdiyan Jun 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, same for me. Maybe I misunderstood the comment then.

/ the path of the document which is being updated. may include slashes to represent a deep index

In what cases can this be a nested path then?

Also, it says "document which is being updated", but this Branch struct only seems to be used in a ListDocumentBranches request which doesn't update anything.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Say document A has a static index key 'b' of document B, who has a static index key 'c' of document C.

If the user is looking at document A/b/c (with a URL like hm://DOC_A_ID/b/c) and they click edit, a new branch will be created. The branch will have document_id=DOC_A_ID and path of b/c.

When the branch is published, a new change will be created for Doc C, and a new change will be created for Doc B which updates the index to the new version of Doc C. And a new change will be created for Doc A which updates the index to the new version of Doc B.

I know this is complex and does not need to be immediately supported. But does that make sense, at least?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought last time we discussed it we said that when I'm looking at a document on hm://<some-namespace-document>/foo/bar/baz which points to some changes who all have common root (or genesis) change QmC1, and then you press "Edit", you are not editing the <some-namespace-document> but rather the document foo/bar/baz points to.

Copy link
Collaborator Author

@ericvicenti ericvicenti Jun 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you are! But it will be saved to the parent or grandparent doc, so the draft reflects that information

@burdiyan burdiyan merged commit 5895e70 into hm24 Jun 21, 2024
1 of 2 checks passed
@burdiyan burdiyan deleted the hm24-proto branch June 21, 2024 15:14
@ericvicenti
Copy link
Collaborator Author

🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants