gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Replace fomantic popup module with tippy.js

Open silverwind opened this issue 3 years ago • 5 comments
trafficstars

WIP with various errors still left to resolve, cleanups to be done. Regular tooltips work.

silverwind avatar Jul 20 '22 19:07 silverwind

This is ready in the sense that it doesn't throw JS errors anymore.

What remains to be done:

  • Check if all JS features work.
  • Maybe restrict certain tooltips in width.

Of note: The code line menu is now a proper menu and it also closes after copy permalink:

image

silverwind avatar Jul 24 '22 14:07 silverwind

Would be nice to make it accessible using aria attributes

lafriks avatar Jul 24 '22 15:07 lafriks

Would be nice to make it accessible using aria attributes

It already sets the tooltip and menu roles on the tippy instances. What else do you have in mind? Some attributes on the trigger element as well?

Edit: aria-describedby might be possible. Edit2: aria-describedby and aria-expanded is already handled automatically.

silverwind avatar Jul 24 '22 16:07 silverwind

Still a few things untested:

  • commit status popup
  • stopwatch popup
  • tooltip widths

silverwind avatar Jul 24 '22 18:07 silverwind

This should be ready to review/merge. At least I don't find any more issues.

silverwind avatar Aug 05 '22 19:08 silverwind

@go-gitea/maintainers need one more review for the refactoring, to avoid potential conflicts in the future.

wxiaoguang avatar Aug 09 '22 04:08 wxiaoguang

popup bug:

image

wxiaoguang avatar Aug 09 '22 15:08 wxiaoguang

And here (commit history) it seems better to make the popup shown on the ~~right~~ top or bottom.

image

wxiaoguang avatar Aug 09 '22 15:08 wxiaoguang

Ah, I may have missed that popup, checking.

silverwind avatar Aug 09 '22 17:08 silverwind

https://github.com/go-gitea/gitea/pull/20736 to fix this popover.

silverwind avatar Aug 09 '22 17:08 silverwind

And here (commit history) it seems better to make the popup shown on the ~right~ top or bottom.

image

I tend to agree that top/bottom is probably a better positioning then left/right for this popover.

silverwind avatar Aug 09 '22 18:08 silverwind

I have applied https://github.com/go-gitea/gitea/pull/20736 but the popup still shows [object Text]

And it's not related to the hide CSS class.

image

image

wxiaoguang avatar Aug 10 '22 00:08 wxiaoguang

https://github.com/go-gitea/gitea/pull/20737 is the actual fix, I split up that PR.

silverwind avatar Aug 10 '22 00:08 silverwind