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

Hierarchical scopes #140

Open
FCO opened this issue Mar 20, 2024 · 2 comments
Open

Hierarchical scopes #140

FCO opened this issue Mar 20, 2024 · 2 comments

Comments

@FCO
Copy link
Contributor

FCO commented Mar 20, 2024

It would be interesting if it could be defined a hierarchical order for the scopes, that way, if I make git > git_banch, when I'm on git_branch scope, I could use git_branch's AND git's tags. That way, it there are files very "popular" on a git repo, I could leave them on git scope and still jump to them when on git_branch scope.

@cbochs
Copy link
Owner

cbochs commented Mar 20, 2024

This could be an interesting option to make available. I would love to flush the idea out a bit more.

I'm thinking that scopes might not necessarily need to be hierarchical, but maybe layered? For example, you could define a layered (combined?) scope like so (mock implementation):

require("grapple").define_scope({
    layers = { "git", "git_branch" } -- could be "combined" instead of "layered"?
})

Where the scopes are resolved, in order. The last one being the "top" of the stack.

Another question arises, then. What should be expected behaviour be in the Tags Window when a user adds/deletes/edits a tag? There could be tags from several scopes, where should new tags go?

@FCO
Copy link
Contributor Author

FCO commented Mar 21, 2024

I think layers would be great! About editing the tags, I think it should show tags from all layers, but if edited, all of them should be saved on the first layer (git on your example) (not removing if from the original one).

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

No branches or pull requests

2 participants