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

The GNX displayed above body text should be a path-based UNL #104

Open
tbpassin opened this issue Jan 2, 2024 · 9 comments
Open

The GNX displayed above body text should be a path-based UNL #104

tbpassin opened this issue Jan 2, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@tbpassin
Copy link

tbpassin commented Jan 2, 2024

Showing a GNX above the panel with the body text is not helpful since it doesn't help the user know anything useful. Either it should be a path-based UNL or it should be removed. See screen shot below:
example-marked-gnx

Also, I tend to mistake this node identifier for actual body text. I am unsure if it's text that accidentally got there and that I can delete, or what.

I suggest reconsidering what purpose this serves.

@boltex boltex self-assigned this Jan 3, 2024
@boltex boltex added the enhancement New feature or request label Jan 3, 2024
@boltex
Copy link
Owner

boltex commented Jan 3, 2024

@tbpassin Thanks!

Yes it's a good idea to have the body pane 'breadcrumbs' start with the full path of the selected commander, exactly like a full path UNL !

Thanks again for this suggestion!

@boltex
Copy link
Owner

boltex commented Jan 3, 2024

@tbpassin You can also turn off breadcrumbs for your editor panels in vscode's settings.

@boltex
Copy link
Owner

boltex commented Apr 29, 2024

@tbpassin
Aha! this might be implementable with a simple trick!

I only have to make a "translation table" for gnx <- -> headline (they have to be unique, so maybe with added number at the end if more than one opened gnx has the same exact headline to differentiate them) , and then keeping the gnx hidden and instead using the headline string as the actual file name so that the breadcrumb displays the node's headline instead of its gnx.

Hmm.... Would not be that hard or complicated to implement after all! Stay tuned! 😉

@tbpassin
Copy link
Author

If you've implemented it, there is a legacy form of the UNL, and that has the path to the node. You could truncate that or leave off the outline part of the path.

Having a separate legacy form of the UNL is relatively new to Leo/Python.

@boltex
Copy link
Owner

boltex commented Apr 30, 2024

@tbpassin Of course I have! :D haha! (Hover your mouse over the Unl:Gnx item at the bottom of the status bar in leojs or leointeg )

image

@boltex
Copy link
Owner

boltex commented Apr 30, 2024

Nevermind all that : I've just discovered that the VSCODE API possibly has something for controlling the breadcrumbs! The "document symbol provider" part of the API seems to be useful for that.

@boltex
Copy link
Owner

boltex commented Apr 30, 2024

@tbpassin

Progress! but, some constraints : The body panes (and detached body panes) are working on a per-VNode basis (gnx) , not per Position. Since UNLs refer to a position I cant's use them.

So I went for a compromise: The breadcrumbs will show the (short) filename, followed by the headline. 😄 This is very similar to a 'short legacy' UNL...

The only difference with a short legacy unl, is that all the middle headlines leading to the final node are hidden, which would anyways be too long in most cases, if the node is even slightly deep in a tree, the unl would be cut for being too long and we'd miss the headline. So seeing the headline is more useful and practical in some way after all rather than having the whole list of parent's headline preceding the headline. :)

@boltex
Copy link
Owner

boltex commented Apr 30, 2024

After experimenting, the most readable and useful breadcrumb above body text in all circumstances is the headline only, without filename.

I may add a option(s) to also have the short/long filename, etc. before the headline. but the default will be headline only.

@boltex
Copy link
Owner

boltex commented Apr 30, 2024

Only problem now is that the breadcrumbs do not refresh if the headline changes, unless the body changes. Even fireing 'file has changed' event does nothing if the content does not actually change. I'll have to find a way around that!

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

No branches or pull requests

2 participants