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

[BUG] Overlay type extra widget in scroll #1268

Open
3 tasks done
VimYoung opened this issue Jan 13, 2025 · 1 comment
Open
3 tasks done

[BUG] Overlay type extra widget in scroll #1268

VimYoung opened this issue Jan 13, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@VimYoung
Copy link

VimYoung commented Jan 13, 2025

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

as long as the scroll is not active, meaning scroll's child length is short, everything is fine. As the length exceeds the limit, scrollview becomes active but renders an unknown "box" looking widget on top of the list.

Interestingly, the widget disappears when cursor is idle, I think this behavior very much resembles the scrollbar but I am not sure.

Reproducing the issue

This is the config I am using for notitable which internally uses dunst's json output from dunstctl history.

(defwindow notitable  ; Stands foor NOTIfication TABLE.
  :monitor 0
  :stacking "fg"
  :windowtype "normal"
  :wm-ignore true 
  :geometry (geometry :focusable false
              :width "30%"
              :height "5px"
              :anchor "left bottom")
  (notiopener))

(defwidget notiopener []
  (eventbox
    :orientation "h"
    :onclick `${EWW_CMD} update notiopen=true`
    (box :hexpand true
      :orientation "h"
      :vexpand true
      (revealer 
        :orientation "h"
        :reveal notiopen
        :duration "300ms"
        :transition "slideup"
        (notilist)))))
Notilist
(defwidget notilist []
  (box :hexpand true
    :height 733
    :vexpand true
    :space-evenly false
    :orientation "v"
    :class "bar"
    (box :vexpand true
      :hexpand true
      :orientation "v"
      :space-evely false
      :geometry (geometry :width "100%")
      (scroll :vscroll true
        :hscroll false
        :space-evely false
        :vexpand false
        :orientation "v"
        :height 650
        (box :orientation "v"
          :hexpand true
          :vexpand false
          :geometry (geometry :width "100%")
          :spacing 5
          :space-evenly false
          (for entry in notijson
            (box :hexpand true
              :class "bar card"
              :orientaton "h"
              :space-evenly false
              (image :class "notiimage"
                :path {entry.icon_path.data}
                :hexpand false
                :width 20
                :image-width 40
                :image-height 40)
              (box :hexpand true
                :orientation "v"
                :spacing 0
                :space-evenly false
                :geometry (geometry :width "100%"
                            :height "1px"
                            :anchor "top")
                (label :wrap true
                  :xalign 0
                  :text {entry.summary.data})
                (label :wrap true
                  :xalign 0
                  :yalign 0
                  :text {entry.body.data}))
              (button :hexpand false
                :class "noticlose"
                :width 20
                :onclick `dunstctl history-rm ${entry.id.data} && ${EWW_CMD} update notijson="$(dunstctl history| jq '."data" | .[]')"`
                (label :yalign 0.5
                  :text "")))))))
    (box :class "notiheading text" 
      :space-evenly false
      :hexpand true
      :spacing 6
      (button :class "notirefresh bar"
        :onclick `${EWW_CMD} update notijson="$(dunstctl history| jq '."data" | .[]')"`
          (label :css "margin: 2px;":xalign 0 :text "󰑐"))
      (button :class "notiremove bar"
        :onclick `dunstctl history-clear && ${EWW_CMD} update notijson="$(dunstctl history| jq '."data" | .[]')"`
          (label :css "margin: 2px;":xalign 0 :text ""))
      (button :vexpand true :hexpand true :onclick `${EWW_CMD} update notiopen=false` " ")
      (label :xalign 1 :text "Notifications"))))

Expected behaviour

the extra widget shouldn't appear.

Additional context

#1011 seemed to be similar but it got closed.
The following video shows the error in 3 situations.

  1. No extra widget when length is not long enough.
  2. Extra widget on top when length exceeds the height and scroll activates.
  3. Widget becomes dark when hovered upon and becomes invisible when cursor becomes idle.
eww_error.mp4

Platform and environment

I am using only wayland manual build on fedora 41. Hyprland is the compositor and eww --version says eww 0.6.0 a7bd80ac1ec77f0c473c7ec70240f8329bffa07b.

@VimYoung VimYoung added the bug Something isn't working label Jan 13, 2025
@VimYoung
Copy link
Author

Update: the issue I mentioned is unrelated to this one. That was occurring because the author hadn't used vexpand in his widget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant