code icon indicating copy to clipboard operation
code copied to clipboard

Inline documentation

Open kousu opened this issue 3 years ago • 8 comments

Problem

I like how minimal code is! It's like Atom or VSCode, but fully libre, which is super encouraging.

But it might a be bit too minimal. I had to go digging in the issues to find out that Ctrl-M toggles block comments (and plus, that thread is out of date: it says it was a plugin, but I don't see a plugin in the plugins picker, so I assume this feature got pulled into the core at some point?). I don't see anywhere in the UI that I could have learned this keyboard shortcut, and there's no menu that could have done it either. What other features am I missing? Without them, I keep hitting walls when trying to use Code for daily use. Looking through https://elementary.io/support for a summary just directed me to the github forum.

Proposal

Add a link to the main menu, below "Toggle Sidebar" and "Preferences", that shows a window with all the information currently in https://github.com/elementary/code/wiki/shortcuts. Or at least that opens a browser to that link.

Prior Art (Optional)

No response

kousu avatar Dec 26 '22 22:12 kousu

The shortcut for toggling comments is displayed in the document context menu. This is the main way Elementary shows app action shortcuts at the moment (or in button tooltips). I think there is an general issue for showing collated app shortcuts (e,g, in a Gtk.ShorcutsWindow).

jeremypw avatar Dec 27 '22 12:12 jeremypw

This is related: https://github.com/elementary/shortcut-overlay/issues/115

jeremypw avatar Dec 27 '22 12:12 jeremypw

Hi! Happy new year; thanks for answering (and no pressure to get back to me any time soon)

The shortcut for toggling comments is displayed in the document context menu.

Is that supposed to be this context menu? It's not there for me:

2022-12-27-132233_1366x768_scrot

I'm using 6.2.0 from this package

pacman -Qi
$ pacman -Qi pantheon-code
Name            : pantheon-code
Version         : 6.2.0-1
Description     : The Pantheon Text Editor
Architecture    : x86_64
URL             : https://github.com/elementary/code
Licenses        : GPL3
Groups          : pantheon
Provides        : None
Depends On      : editorconfig-core-c  glib2  gtk3  gtksourceview4  libgee  libgit2-glib  libgranite.so=6-64  libhandy-1.so=0-64
                  libpeas  pango  polkit
Optional Deps   : gtkspell3: Spell Check plugin
                  libsoup: Pastebin plugin [installed]
                  vala: Outline plugin
                  vte3: Terminal plugin [installed]
                  webkit2gtk: Browser Preview plugin
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 2.46 MiB
Packager        : Maxime Gauduin <[email protected]>
Build Date      : Tue 26 Apr 2022 12:29:22 PM
Install Date    : Fri 09 Dec 2022 07:23:25 AM
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

kousu avatar Dec 27 '22 18:12 kousu

This is how it looks on elementary Horus (pre-release):

Screenshot from 2022-12-28 13 48 34

I could not see any commits since release of version 6.2.0 that would affect this though. Maybe due to newer version of Granite or Gtk3?

jeremypw avatar Dec 28 '22 14:12 jeremypw

Here's all the packages I have underneath:

$ pactree -u pantheon-code | xargs -n1 pacman -Q | sort  # using `pactree` from `pacman-contrib`
acl 2.3.1-2
adobe-source-code-pro-fonts 2.038ro+1.058it+1.018var-1
adwaita-cursors 43-2
adwaita-icon-theme 43-2
argon2 20190702-4
at-spi2-core 2.46.0-2
attr 2.5.1-2
audit 3.0.8-1
avahi 0.8+22+gfd482a7-3
bash 5.1.016-1
brotli 1.0.9-9
bzip2 1.0.8-5
ca-certificates 20220905-1
ca-certificates-mozilla 3.85-1
ca-certificates-utils 20220905-1
cairo 1.17.6-2
cantarell-fonts 1:0.303.1-1
coreutils 9.1-3
cryptsetup 2.6.0-1
curl 7.86.0-4
dbus 1.14.4-1
dconf 0.40.0-2
default-cursors 1-1
desktop-file-utils 0.26-2
device-mapper 2.03.17-1
duktape 2.7.0-4
e2fsprogs 1.46.5-4
editorconfig-core-c 0.12.5-1
expat 2.5.0-1
file 5.43-1
filesystem 2022.10.18-1
findutils 4.9.0-1
fontconfig 2:2.14.1-2
freetype2 2.12.1-1
fribidi 1.0.12-1
gcc-libs 12.2.0-1
gdbm 1.23-1
gdk-pixbuf2 2.42.10-1
glib2 2.74.3-1
glibc 2.36-6
glib-networking 1:2.74.0-1
gmp 6.2.1-2
gnutls 3.7.8-4
gobject-introspection-runtime 1.74.0-1
granite 6.2.0-2
graphite 1:1.3.14-2
gsettings-desktop-schemas 43.0-1
gtk3 1:3.24.35-2
gtksourceview4 4.8.4-1
gtk-update-icon-cache 1:4.8.2-1
harfbuzz 5.3.1-3
hicolor-icon-theme 0.17-2
http-parser 2.9.4-1
hwdata 0.365-1
iana-etc 20221107-1
icu 72.1-2
iptables 1:1.8.8-2
iso-codes 4.12.0-1
json-c 0.16-1
json-glib 1.6.6-2
kbd 2.5.1-1
keyutils 1.6.3-1
kmod 30-3
krb5 1.20.1-1
lcms2 2.14-1
libcap 2.66-1
libcap-ng 0.8.3-1
libcloudproviders 0.3.1+r8+g3a229ee-1
libcolord 1.4.6-1
libcups 1:2.4.2-3
libdaemon 0.14-5
libdatrie 0.2.13-2
libdrm 2.4.114-1
libedit 20210910_3.1-2
libelf 0.188-1
libepoxy 1.5.10-1
libevent 2.1.12-4
libffi 3.4.4-1
libgcrypt 1.10.1-2
libgee 0.20.6-1
libgit2 1:1.5.0-2
libgit2-glib 1.1.0-1
libglvnd 1.5.0-1
libgpg-error 1.46-2
libhandy 1.8.0-1
libidn2 2.3.4-3
libjpeg-turbo 2.1.4-2
libldap 2.6.3-2
libmnl 1.0.5-1
libnetfilter_conntrack 1.0.9-1
libnfnetlink 1.0.2-1
libnftnl 1.2.4-1
libnghttp2 1.51.0-1
libnl 3.7.0-1
libomxil-bellagio 0.9.3-3
libp11-kit 0.24.1-1
libpcap 1.10.1-2
libpciaccess 0.17-1
libpeas 1.34.0-1
libpng 1.6.39-1
libproxy 0.4.18-1
libpsl 0.21.1-3
librsvg 2:2.55.1-1
libsasl 2.1.28-3
libseccomp 2.5.4-1
libsoup3 3.2.2-1
libssh2 1.10.0-3
libstemmer 2.2.0-2
libsysprof-capture 3.46.0-1
libtasn1 4.19.0-1
libthai 0.1.29-2
libtiff 4.4.0-4
libtirpc 1.3.3-2
libunistring 1.1-2
libunwind 1.6.2-2
libusb 1.0.26-1
libverto 0.3.2-4
libx11 1.8.2-2
libxau 1.0.11-1
libxcb 1.15-2
libxcomposite 0.4.6-1
libxcrypt 4.4.33-1
libxcursor 1.2.1-3
libxdamage 1.1.6-1
libxdmcp 1.1.4-1
libxext 1.3.5-1
libxfixes 6.0.0-2
libxft 2.3.7-1
libxi 1.8-2
libxinerama 1.1.5-1
libxkbcommon 1.4.1-2
libxml2 2.10.3-2
libxrandr 1.5.3-1
libxrender 0.9.11-1
libxshmfence 1.3.2-1
libxtst 1.2.4-1
libxxf86vm 1.1.5-1
linux-api-headers 5.18.15-1
llvm-libs 14.0.6-4
lm_sensors 1:3.6.0.r41.g31d1f125-2
lz4 1:1.9.4-1
lzo 2.10-4
mesa 22.2.3-1
ncurses 6.3-3
nettle 3.8.1-1
openssl 3.0.7-2
p11-kit 0.24.1-1
pam 1.5.2-1
pambase 20221020-1
pango 1:1.50.12-1
pantheon-code 6.2.0-1
pcre2 10.40-3
pcre 8.45-3
pixman 0.42.2-1
polkit 122-1
popt 1.19-1
readline 8.2.001-1
shadow 4.12.3-2
shared-mime-info 2.0+155+gf4e7cbc-1
sqlite 3.40.0-2
systemd 252.3-1
systemd-libs 252.3-1
tracker3 3.4.2-1
tzdata 2022g-1
util-linux 2.38.1-1
util-linux-libs 2.38.1-1
vulkan-icd-loader 1.3.235-1
wayland 1.21.0-2
xcb-proto 1.15.2-2
xkeyboard-config 2.37-1
xorgproto 2022.2-1
xz 5.2.9-1
zlib 1:1.2.13-2
zstd 1.5.2-7

Maybe it's important to say I'm not running pantheon-session; I'm running i3, and I'm pretty sure I've seen this behaviour under plasma-desktop as well. Can the desktop environment have such a large effect on how context menus render?

EDIT: I installed pantheon-session and booted into it by setting this in my ~/.xinitrc:

exec gnome-session --builtin --session=pantheon

and running startx. But when I started Code up the context menus were still missing shortcuts.

Very odd! I'll take this up with the Arch packagers too. Maybe they have an idea.

kousu avatar Dec 28 '22 16:12 kousu

Hmm, I checked that the accelerator labels show correctly on current release of elementary (6.1) as well and your Granite and Gtk library versions match so its strange. Maybe a stylesheet issue? elementary 6.1 has io.elementary.stylesheet version 7.0.0. It seems unlikely the window manager would have such a specific effect.

jeremypw avatar Dec 28 '22 18:12 jeremypw

i believe this is an stylesheet issue, elementary has an custom keycap css class that is used on accel labels.

Marukesu avatar Dec 28 '22 18:12 Marukesu

I guess that would explain it, although I would have thought it should fallback to something visible and legible.

jeremypw avatar Dec 28 '22 18:12 jeremypw