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

Extra spaces in comments because of using TAB #162

Closed
paulmolluzzo opened this issue Apr 6, 2016 · 24 comments
Closed

Extra spaces in comments because of using TAB #162

paulmolluzzo opened this issue Apr 6, 2016 · 24 comments
Labels

Comments

@paulmolluzzo
Copy link
Contributor

This is a side effect of #117 I believe (pretty close to positive).

To use the available autocomplete when inserting a @ mention or emoji, you type @, TAB or :, TAB. This winds up adding extra spaces to the end of the comment. You don't really notice until you try to quickly get to the end of the text/line with .

I have a sneaking suspicion that other keyboard events are adding spacing too, but I can't replicate it.

@sindresorhus
Copy link
Member

// @blackjid

@hkdobrev
Copy link
Contributor

hkdobrev commented Apr 6, 2016

We can work around that by detecting if we are in a code block or fenced code block. If we can't easily do that, I'd suggest using Shift + Tab for indenting.

@blackjid
Copy link
Contributor

blackjid commented Apr 6, 2016

I made a PR where I check whether the suggestion box is active of not before to indent

@hkdobrev
Copy link
Contributor

hkdobrev commented Apr 7, 2016

Can't we just use Shift + Tab for indenting so we won't be affecting the normal Tab behaviour?

@blackjid
Copy link
Contributor

blackjid commented Apr 8, 2016

I don't like the idea of Shift + Tab to fallback to normal. I rather prefer to unindent with that combination. That is what my muscle memory would expect.

Thoughts?

@paulmolluzzo
Copy link
Contributor Author

paulmolluzzo commented May 6, 2016

Does anyone have an objection to squashing this one via a revert of the functionality? There are 3 PRs to fix this (#164, #192, #197) and none seem close to completion.

Some motiviation: https://bugs.mysql.com/bug.php?id=16555

More motivation: https://bugs.mysql.com/bug.php?id=11472

@jamestalmage
Copy link

The tab functionality is what finally got me to install this. So I would hate to see it go.

Is there any possibility to display whitespace characters like my editor does?

screenshot 2016-05-05 22 39 19

@paulmolluzzo
Copy link
Contributor Author

I'd like to keep it too, but I see the bug more than I use the feature.

@jamestalmage
Copy link

but I see the bug more than I use the feature.

I don't get the problem though. It doesn't render, so why is it a big deal?

@paulmolluzzo
Copy link
Contributor Author

The OP of this issue explains it, but I wind up with extra spaces at the end of the comment that I have to delete.

@jamestalmage
Copy link

I'm asking why you feel the need to delete them.

@paulmolluzzo
Copy link
Contributor Author

paulmolluzzo commented May 6, 2016

Because, @jamestalmage this is why.

E: GitHub trims the space? Still annoying. Let's kill the bug.

@jamestalmage
Copy link

jamestalmage commented May 6, 2016

E: GitHub trims the space? Still annoying. Let's kill the bug

That's my point though. The extra whitespace doesn't matter. Both of my previous messages have tons of added whitespace in them and you never noticed. Even the email notification has no extra spaces in it. I'm all for killing the bug, but if it's living with this bug or living without the feature, I'll happily live with the bug. (I definitely think we can fix it though).

@sindresorhus
Copy link
Member

We merged a temp fix, but would be nice to fix it properly.

@Ma27
Copy link
Contributor

Ma27 commented Jun 13, 2016

I'd also like to see Shift + Tab.
Although I use refined-github for a while now and I like it, I'm still used to do Shift + Enter to submit a comment/PR/etc.

To avoid conflicts between those keyboard shortcuts I'd prefer that solution. If enough people are in favor of it (seen some comments of people who were against it) I could do this in a PR.

@sindresorhus
Copy link
Member

@Ma27 Shift+Tab is more commonly used for unindenting. I would prefer a solution that preserved Tab for indenting.

@jonhoo
Copy link

jonhoo commented May 21, 2017

The current behavior also interacts poorly with using Ctrl + Tab for switching tabs. If I'm writing a comment and have to switch to another tab for reference, pressing Ctrl + Tab causes spaces to be inserted into the comment just before the tab switch occurs. When I switch back, I have to erase the spaces before I can continue typing :(

@fregante
Copy link
Member

fregante commented Jul 5, 2017

I can't reproduce any of the issues described here, which were probably addressed by https://github.com/sindresorhus/refined-github/blob/f304ff7fcfc8edbe07f4e33794fd2a043024711f/src/content.js#L470-L473

Can we close this?

@fregante
Copy link
Member

Reopen if this is still an issue even after #567

@Logerfo
Copy link

Logerfo commented May 28, 2019

@bfred-it it is an issue for me as for today. It also makes me very disappointed that there are an uncountable number of feature that I can disable, but this is not one of them.

@fregante
Copy link
Member

This is one of them, it’s part of the keyboard shortcuts.

The only feature you can’t disable are CSS-only ones, and even some of those still have JS switches to be disableable.

@Logerfo
Copy link

Logerfo commented May 29, 2019

If someone is facing the same problem and want to disable it, the feature is called comment-fields-keyboard-shortcuts, thank you @bfred-it for the insight.

@fabiospampinato
Copy link

fabiospampinato commented Jun 13, 2019

Reopen if this is still an issue even after #567

This is still absolutely the case, when selecting an emoji from the popover with tab extra whitespaces are inserted for me.

Can we reopen?

@fregante
Copy link
Member

Refer to #2148

@refined-github refined-github locked and limited conversation to collaborators Jul 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

10 participants