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
Filter for symbol tree - improved version #3055
Conversation
Except two minor remarks, this is great! Tested and works very well. |
Gentle prompt, its a UI change and new functionality so manual change also needed. |
Where are those? Since I can't find them, maybe a minor remark of my own :-). Maybe we should consider what widget in the sidebar gets the focus by default - right now it's the entry (and the tree focus is just one
Same here and it actually applies to the whole patch. I was thinking about this feature for a long time but thinking it would be annoying to do and then saw the pull request which was pretty trivial and mostly working so I got attracted :-).
Sure, if it's something that's going to be merged, I'll definitely update it. |
Sorry, I forgot to submit my review. Now done.
Same here and not sure what would be the best default.
:) |
I actually haven't found anything in the documentation regarding the symbol tree (unless I missed it) so I'd have to write some new section about it. In my opinion, the tooltip says it all and there shouldn't be any need for any extra explanation.
I kept the focus as it is now - it seems to behave quite OK and and it would require moving Line 1700 in 0601c73
to Line 1143 in 0601c73
None of it is a problem to do though if someone wants to focus the tree by default. |
I'm happy with current focus behavior and also with the rest. I'll leave @elextr a bit time to raise his veto, otherwise I'd like to merge soon. |
Ok, so we have abandoned the manual then? (This is not directed at @techee specifically, it is a general question, a number of recent changes have not been documented, but then thats what the code is for, right?) Every time something is merged without documenting it "because there is nothing in the manual at the moment" is another time the manual becomes more useless to users. [end grumpy] |
I was just asking, I can write something if desired. I just haven't found any place where I should put it and none of the items in the right-click menu in symbol tree is documented either right now. The searchbar in the plugin manager isn't documented either. I'm not sure if documenting obvious things like filtering just doesn't add noise to the documentation without any real value. |
Sorry if you took it personally, as I said, my grump wasn't directed at you, we are all responsible for it.
Its a good question, what are we targeting the manual at? Its currently a random mixture of beginners info and experts info. Certainly Geany users are mostly some sort of developer (I count Markdown and similar writers as developers), but not necessarily the same type, a C expert may not be a HTML/web expert and vice versa. So things that are "obvious" to some users may not be obvious to others even if they are not "beginners", so at least mentioning capabilities to make them discoverable would be good. As an example I would just add a subsection to the end of the "The Geany workspace" section that mentions the capabilities without going into chapter and verse about how to invoke them or needing @eht16 to add and maintain an image of his right click menus 😄. Sidebar Usage
^^^^^^^^^^^^^
The sidebar has a right click menu that can control what is visible and has actions specific to the tab (other tabs added by plugins are described by that plugin documentation):
* Symbols Tab
* expand/collapse the tree
* control sorting order
* locate the symbol in documents
The symbols tab can also be filtered by typing a symbol prefix into ... [@techee to fill in, don't forget when the filter autoremoves (if it does)]
* Documents
* expand/collapse the tree
* save to or reload from files
* search tree based at selected file
* show or hide the document paths (Warning: my rEsT may need correcting) |
IMO "abandoned" is a bit too strong here. I try to remind myself and others of updating the manual but sometimes I consider additions also as not worth adding or just obvious while being aware that "obvious" is very subjective.
I guess the target audience is what you described: users with a very beginner level as well as "C experts". I think we can not and should not decrease the target audience. In this case, I would agree with @techee that the filter feature (with its tooltip) is pretty much obvious. |
No problem at all, I just wasn't sure what to do. I'll use your stub (thanks) and update the docs using it. |
Sorry, but grumpy olde guys are required to go a bit overboard, its in our contract 😄
Because I have been trying other tools recently where I am what I would call an "expert beginner" I can appreciate how useful it is having at least a mention of features in the help/manual to point in the right direction. Things like filters behave differently on different tools, neither Eclipse or Vscode have filters on symbols (AFAICT)1, and for example the Eclipse filter for the equivalent of the "Documents" sidebar has a tick list to filter by "C/C++ Files" and categories like that, so having an outline of what the Geany one does is worthwhile to reduce expectations and "how do I do XXX" issues (they become "feature request" issues instead 👿 ).
I think sometimes PR writers overestimate what I expect by "documentation" and I appreciate that English isn't everyone's native language, thats why I provided the outline as an example to show what I personally think is useful. So long as there is some outline or mention of the feature, at least it indicates that there is some functionality in that area, where it is hiding (eg Eclipse document filter is hidden behind a funnel icon on the toolbar, not an entry like Geany symbols filter), and will show up when help is searched, which is totally sufficient for "expert beginners" and somewhere for "beginner beginners" to start from. Remember the Geany "Manual" is also its "Help" and as it opens in a browser there is usually good search capability. Rest assured I have no intention of turning the Geany Manual into a full 1000 page book 😄 The outline can also be added to when the "Documents" filter is added. Footnotes
|
Docs look fine to me. |
Generally works for me for C, but there is a problem with Asciidoc and Rest where stray headings are catenated by |
Good catch, I was thinking about it but then forgot to implement it. I added |
@techee why do we have conflicts? |
This is because #3060 was merged and I used How should I resolve the conflict - merge master to this branch, rebase, or possibly submit the last 4 patches as a separate pull request? |
Ahh, tripped yourself up Probably this is a case where there is no choice but to rebase this (but not Git expert). |
Code mostly stolen from the plugin manager.
I did a hybrid approach - did reset to |
Still LGTM, the stray headings problem seems solved. Fine to merge? |
I can't test anything for a while, but if ReSt and Asciidoc are fixed its fine with me. |
I just tested the filtering for "re" in |
It was the same problem IIUC, so if rest is ok, asciidoc should be ok too (except for bugs :-) so don't wait for me. |
Great. @techee do you like to squash some of the commits? |
Yeah, will do for the obvious "bugfix" ones. |
* Add search icon to the entry * Mention the possibility to use more filters separated by space in tooltip * Focus the tree when pressing enter in the search entry
Thanks to @elextr for most of the text.
This thing is called "scope separator" officially in ctags and when someone adds a new parser to Geany, it's unnecessary to cause a confusion to that person by strange naming.
…tor() symbols_get_context_separator() uses filetype ID as its argument and tm_parser_scope_separator() uses parser ID as its argument and those are easy to confuse. Use just one of them in Geany code to avoid errors.
The added tm_parser_scope_separator_printable() function is a human readable representation of scope separator. For most languages, this is equal to the scope separator but for some (mostly markup languages), some "strange" scope separators are used like \0x3 or \"\" and we need something more readable when displayed to users. " > " seems to look good. This new function can be used to: 1. Format calltips (though real languages use human-readable scope sep) 2. Symbol tree filter and display.
Done.
All of the non-printable scope separators (and "strange" separators like the same way so when it works for rst, the same will work for Asciidoc too. |
Great! Thanks. |
I took the symbol tree filtering implementation from #2657 and applied some of the suggested changes on top of it:
What do you think?