code icon indicating copy to clipboard operation
code copied to clipboard

Show symbol outline pane on right of document

Open jeremypw opened this issue 4 years ago • 11 comments

Fixes #1033

Assistance required re best way to restyle the outline sourcelist to match document.

jeremypw avatar May 22 '21 14:05 jeremypw

SymbolsOnRight

jeremypw avatar Aug 31 '21 16:08 jeremypw

@danrabbit I would appreciate your advice as to how to get the symbol list (which is a Granite.Widgets.SourceList) to follow the styling of the document wrt background and text color.

jeremypw avatar Aug 31 '21 16:08 jeremypw

@jeremypw it is probably worth looking at and adapting this method, as setting the background to @tab_base_color seems to get us most of the way there:

https://github.com/elementary/code/blob/16d771627b6e04407a6779cc4cc70258e85192c9/src/Widgets/DocumentView.vala#L100-L121

Screenshot from 2022-01-06 11-55-23 Screenshot from 2022-01-06 11-55-19 Screenshot from 2022-01-06 11-55-14

Perhaps renaming that method and defining a GTK CSS variable called @themed_bg or something could work, then we could use that in the various places we want to use that color?

cassidyjames avatar Jan 06 '22 18:01 cassidyjames

@cassidyjames Thanks for the suggestion! I'll try that.

jeremypw avatar Jan 07 '22 10:01 jeremypw

@cassidyjames Implemented your suggestion - thanks.

jeremypw avatar Jan 08 '22 12:01 jeremypw

If we're moving this anyways, can we make it not be a plugin and just have it be part of the app?

I wonder if we should also add a menuitem to toggle its visibility like we have with the sidebar

danirabbit avatar Jan 11 '22 20:01 danirabbit

Yes, it should not be too hard to move the code into a "SymbolOutline" subfolder of \src and bypass the plugin interface. As you say, an alternative way of toggling it will be needed.

jeremypw avatar Jan 12 '22 10:01 jeremypw

The latest commit moves the outline code to the /src. Note that you should run it as a flatpak as it is not compatible with the existing plugin code. Otherwise you will need to delete the outline plugin from /usr/lib/x86_64-linux-gnu/io.elementary.files/plugins.

Should I include code to blacklist/overwrite the outline plugin in the same way as I did in #1151?

jeremypw avatar Jan 14 '22 19:01 jeremypw

I have taken the opportunity to DRY the code to reduce duplication between the Vala and C outliners.

jeremypw avatar Jan 14 '22 19:01 jeremypw

Need to fix some regressions.

jeremypw avatar Jan 14 '22 19:01 jeremypw

I have added code to overwrite the old plugin when not installed as Flatpak in order to make development and testing easier. This can easily be reverted if considered unnecessary.

jeremypw avatar Jan 15 '22 18:01 jeremypw

Removed "blacklist" code as it was not needed when the strip-trailing-spaces plugin was moved into main code.

jeremypw avatar Oct 21 '22 09:10 jeremypw