Sticky the edit button and formatting tools of the wiki #533

Closed
opened 2021-10-27 11:20:29 +02:00 by v4vachan · 4 comments
Image

I use the codeberg wiki a lot. But I wish the formatting tools would stick with the header so I won't have to scroll all the way up to edit the page or select a formatting option.

I use the codeberg wiki a lot. But I wish the formatting tools would stick with the header so I won't have to scroll all the way up to edit the page or select a formatting option.
Image

I'm not sure how to contribute, but I am able to do some frontend dev in the browser :').

The class editor-toolbar needs to become position: sticky, with a top of 1px (on 0 it won't work because of inheritance), with a z-index high enough to make it visible (200 works).

It's then transparant, so it would need a background, and the bottom border should be added.

Adding a bottom border makes it before becoming sticky a double one because the codemirror is styled to have borders all around, so the CodeMirror class should remove it's top border, because the editor toolbar has it in it's bottom.

Long story short, if someone adds this to codeberg.css it would work;

.editor-toolbar {
	position: sticky;
	top: 1px;
	z-index: 200;
	background: var(--color-body);
	border-bottom: 1px solid var(--color-secondary);
}

.CodeMirror {
	border-top: 0;
}
I'm not sure how to contribute, but I am able to do some frontend dev in the browser :'). The class editor-toolbar needs to become position: sticky, with a top of 1px (on 0 it won't work because of inheritance), with a z-index high enough to make it visible (200 works). It's then transparant, so it would need a background, and the bottom border should be added. Adding a bottom border makes it before becoming sticky a double one because the codemirror is styled to have borders all around, so the CodeMirror class should remove it's top border, because the editor toolbar has it in it's bottom. Long story short, if someone adds this to codeberg.css it would work; ```css .editor-toolbar { position: sticky; top: 1px; z-index: 200; background: var(--color-body); border-bottom: 1px solid var(--color-secondary); } .CodeMirror { border-top: 0; } ```
Image
Owner

This should ideally go into upstream Gitea, we want to avoid codeberg-specific patches where possible.

This should ideally go into upstream Gitea, we want to avoid codeberg-specific patches where possible.
Image

@fnetX if they're willing to accept it, I've done my first PR on gitea now, including another issue in their tracker related to sticky scrolling.

https://github.com/go-gitea/gitea/pull/18271

@fnetX if they're willing to accept it, I've done my first PR on gitea now, including another issue in their tracker related to sticky scrolling. https://github.com/go-gitea/gitea/pull/18271
Image
Author

@fnetX if they're willing to accept it, I've done my first PR on gitea now, including another issue in their tracker related to sticky scrolling.

https://github.com/go-gitea/gitea/pull/18271

Thanks for working on it. Appreciate your work

> @fnetX if they're willing to accept it, I've done my first PR on gitea now, including another issue in their tracker related to sticky scrolling. > > https://github.com/go-gitea/gitea/pull/18271 Thanks for working on it. Appreciate your work
Image 6543 closed this issue 2022-08-09 18:53:27 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Community#533
No description provided.