Skip to content

Conversation

@CirnoT
Copy link
Contributor

@CirnoT CirnoT commented Jun 21, 2020

Use pure CSS position: sticky and disable Fomantic sticky component

chrome_2020-06-21_13-41-48
chrome_2020-06-21_13-42-02

The border is applied always because there isn't any way to check if element is stuck or not without delegating to JS.

@silverwind
Copy link
Member

Not a huge fan of JS-based sticky implementations as CSS position: sticky is usually superior if it can be used. Would it be possible here?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 21, 2020
@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 21, 2020

We are using Fomantic sticky element however, so no, it is not.

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 21, 2020

A quick test show that

  position: sticky;
  top: 0;

seem to work. Should we stop using Fomantic's sticky element in that case?

@silverwind
Copy link
Member

Good call removing the sticky module, thanks.

@lafriks lafriks added the topic/ui Change the appearance of the Gitea UI label Jun 21, 2020
@lafriks lafriks added this to the 1.13.0 milestone Jun 21, 2020
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 21, 2020
Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now the glitch is gone

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 22, 2020
@techknowlogick
Copy link
Member

ping lg-tm bot

@techknowlogick techknowlogick merged commit daf6284 into go-gitea:master Jun 22, 2020
@CirnoT CirnoT deleted the diff-sticky branch June 22, 2020 19:05
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* Fix sticky diff stats container

* Use pure CSS sticky instead of Fomantic's JS

* add border color to arc-green

* add slight padding on sides

* make linter happy

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants