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

Floating reply box? #6861

Closed
jsumners opened this issue Aug 28, 2023 · 7 comments
Closed

Floating reply box? #6861

jsumners opened this issue Aug 28, 2023 · 7 comments

Comments

@jsumners
Copy link

Description

I'm not sure this is even possible, but figured I'd ask the experts:

There are times when I need to reply to threads that have already received a lot of responses and I need to quote lines from those responses for context. Or maybe a response is particularly long and still results in pushing the reply box far off the bottom of the viewport. Would it be possible to "float" the reply box to the side such that it stays fixed in view while replying? It'd be amazing if it could be "popped out", e.g. like composing an email in Gmail, but I highly doubt that is feasible (at least not feasible while retaining the "quote in reply" feature).

Example URLs

nodejs/TSC#1430

@fregante
Copy link
Member

fregante commented Sep 1, 2023

I think this would conflict with fit-textareas because the field might extend beyond the viewport height. Not to mention the high chance of breakage.

I think a similarly-convenient feature would be to have a fixed "scroll to field" button that shows up when the field is not empty. This would complement unfinished-comments

@jsumners
Copy link
Author

jsumners commented Sep 1, 2023

I think a similarly-convenient feature would be to have a fixed "scroll to field" button that shows up when the field is not empty.

I don't understand what this is describing. Would be affixing the reply box to the bottom of the viewport such that prior comments scroll under it?

@fregante
Copy link
Member

fregante commented Sep 2, 2023

Are you familiar with the "Scroll to top" floating buttons? The same, but it scrolls to the text field instead.

@jsumners
Copy link
Author

jsumners commented Sep 2, 2023

🤔 that might be an improvement. I'm really not sure. Having the text field always in the viewport would be optimal in my opinion.

@kidonng
Copy link
Member

kidonng commented Nov 7, 2023

This works well enough for me:

#new_comment_form .CommentBox {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10;
    width: 320px;
    max-height: calc(100vh - 92px);
    overflow-y: scroll;
}

It makes the comment box fixed to the right side.

To have it as a toggle so you can "pop it out" on demand, use a user style manager like Stylus.

(Or use Refined GitHub's custom CSS feature if you don't feel bothered by enabling it all the time)

@jsumners
Copy link
Author

jsumners commented Nov 7, 2023

That's definitely doing the trick. Is there some CSS magic to make it arbitrarily resizable?

@fregante
Copy link
Member

fregante commented Jun 5, 2024

I'd love this, as a separate userscript.

@fregante fregante closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants