Refined-github: New Issue editor toolbar cuts out buttons, like "Add a link", "Insert code", and more

Created on 10 Sep 2019  ·  9Comments  ·  Source: sindresorhus/refined-github

Love the extension but this has been bothering me ever since I installed it. Some editor buttons end up missing - and a different set is missing in different cases.

New Issue without extension:
image

New Issue with extension:
image

As you can see, on New Issue pages, the link, insert code, and a few other buttons are missing. However, they're present in the Leave a comment UI and a different set of buttons is missing there.

Add a comment without extension:
image

Add a comment with extension:
image

Why is this happening and can it be fixed?

Thanks.

bug good first issue help wanted

All 9 comments

image

Disable this option

Why is this happening and can it be fixed?

It's happening because all those buttons can be replicated via keyboard shortcuts, you don't need to press those buttons.

Thanks. Can we have a discussion about:

  • Why some of those are considered unnecessary, especially the Add link button? (edit: typed this before seeing the answer above)
  • Why the sets of what's hidden differ between New Issue and Add a comment?

By the way, https://user-images.githubusercontent.com/1402241/53629083-a4fe8900-3c47-11e9-8211-bfe2d254ffcb.png, which is the image used by https://github.com/sindresorhus/refined-github/blob/master/source/features/clean-rich-text-editor.tsx, actually shows these buttons as still being there, while in fact they're removed in the New Issue UI, so I believe the real issue is it's removing the wrong buttons:
image

while in fact they're removed in the New Issue UI, so I believe the real issue is it's removing the wrong buttons:
image

Ouch, indeed!

This is broken again.

Issue page ❌

Screenshot 2019-11-12 at 13 47 20

Open PR ✅

Screenshot 2019-11-12 at 13 47 45

Closed PR ✅

Screenshot 2019-11-12 at 13 47 26
cc @arnaudvalle

As a solution, we should drop the markdown-toolbar > :nth-last-child lines altogether and target the button specifically, like we do for md-mention and md-ref. The downside is that there will be extra spacing in some cases but that's much better than hidden _useful_ buttons.

Hello there - I'll have a look at it in the next few days

@fregante Ah well too fast for me :) Thanks for sorting it out 👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hkdobrev picture hkdobrev  ·  3Comments

mareksuscak picture mareksuscak  ·  3Comments

MilesBHuff picture MilesBHuff  ·  3Comments

fregante picture fregante  ·  3Comments

sindresorhus picture sindresorhus  ·  3Comments