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

Add inline replies to notifications #221

Merged
merged 11 commits into from
May 29, 2023
Merged

Add inline replies to notifications #221

merged 11 commits into from
May 29, 2023

Conversation

ErikReider
Copy link
Owner

@ErikReider ErikReider commented Feb 21, 2023

Fixes: #179

Had to do a lot of tweaking in this PR due to a Notification essentially being a GtkButton with content inside of it. I replaced said GtkButton with an GtkEventBox that behaves like a button but respects children with input.

Todo:

  • Double check the CSS and make it more accessible (probably contrast)
  • Make use of KeyboardMode.ON_DEMAND to be able to focus the GtkEntry when in NotiWindow. (Can't test in Sway. Maybe just support in CC if WM only supports layershell v3?). Alt method (Works in Hyprland so I pushed a PR to Sway to fix this issue)
  • Test in applications (tested in Chrome in https://tests.peter.sh/notification-generator/)
  • Add inline-reply to notiModel to_string output
  • Press enter to reply

image

Testing:

notify-send 'Title' 'body' -A inline-reply=Text
or
https://tests.peter.sh/notification-generator/

Everything is done here, just need to make sure that it works as expected in Sway, swaywm/sway#7587

@ErikReider ErikReider added the enhancement New feature or request label Feb 21, 2023
@ErikReider ErikReider self-assigned this Feb 21, 2023
@ErikReider ErikReider merged commit ba4a266 into main May 29, 2023
@ErikReider ErikReider deleted the inline-reply branch May 29, 2023 13:08
@tukusejssirs
Copy link

@ErikReider, do I get it right that inline replies will work on Sway after swaywm/sway#7587 is merged? 🤔

@ErikReider
Copy link
Owner Author

@ErikReider, do I get it right that inline replies will work on Sway after swaywm/sway#7587 is merged? thinking

Will work now, but only in the control center. We check if the compositor supports the ON_DEMAND interactivity which is required to get keyboard focus on floating notifications which is added in that PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle action of type text
2 participants