Skip to content

[Feature] Sticky fileheader when code reviewing #12552

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

Closed
Floaf opened this issue Aug 21, 2020 · 4 comments · Fixed by #14616
Closed

[Feature] Sticky fileheader when code reviewing #12552

Floaf opened this issue Aug 21, 2020 · 4 comments · Fixed by #14616
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@Floaf
Copy link

Floaf commented Aug 21, 2020

It would be nice with sticky fileheader since it can be a bit messy when reviewing long files, like github has:

image

@HenrikBengtsson
Copy link
Contributor

FWIW, this is related to Feature Request #10675 (Sticky issue titles)

@silverwind
Copy link
Member

Two different kind of sticky things. This one may actually be useful as opposed to the linked one.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Aug 22, 2020
@bryanpedini
Copy link

Is CSS capable of "keeping track" of existing parts with the "sticky bit" set?

Explain better: if answer to the previous section is yes, then you can check app.ini for "stickyness" variables/section, then give the same sticky-top class to one/both (issue/pull) title and filename accordingly, then CSS "figures out" to put the first on top and the latter just below it.

PS: may I ask a thing too, one that even GitHub nor GitLab have?
Please add the home/back button to the sticky header as well. When working with keyboard shortcuts sure it's quick to alt+left to go back, but when using mouse only to perform quick searches and you've scrolled down a lot, a quick "home" button would be helpful too (especially since I always open things in a new page, so I can't use the browser back/forward functions, my bad 😅)

@silverwind
Copy link
Member

CSS sticky requires absolute positioning on all stickied elements so it can't work with two individual elements, so I assume some JS is needed for the second sticky bar and if the solution is JS-based, it's probably better to do both in JS.

vnkmpf added a commit to vnkmpf/gitea that referenced this issue Feb 8, 2021
6543 pushed a commit that referenced this issue Feb 11, 2021
* Make fileheader sticky #12552

* Remove sticky filenames when width is 480px or less

On mobile phone sticky filename is hidden due to the combination
of many possible widths and lengths.

* Fix text color for .markdown-info

* Fix visual of sticky diff box on 480px or less

- Hide arrow for select buttons.
- Fix changes, additions and deletions.
With flexbox they look very broken.
This commit hides some words to, so the result is:
"123 changed files  987 additions  456 deletions"
- center text in buttons

Co-authored-by: zeripath <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants