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

feat: Add reason field to notification output #79

Merged
merged 6 commits into from
Mar 12, 2024
Merged

feat: Add reason field to notification output #79

merged 6 commits into from
Mar 12, 2024

Conversation

LangLangBart
Copy link
Collaborator

@LangLangBart LangLangBart commented Mar 8, 2024

description

The WebUI also shows the user the notification reason1. In some situations, this may be
useful to the user. This PR would add the reason to the notification output.

Points to consider:

  • Where should we display the reason?
    • Currently, it is after the type.
  • The magenta dot for unread notifications gets pushed further to the right and may not be visible
    with small terminals or extremely long repo names.
    • One idea would be to truncate the repo names, and add a hidden field with the full repo name, as
      the full name is needed to perform action on it, for example opening it in the browser.
    • Another idea is to move the magenta dot to the very beginning of the notification line or
      after the timestamp.

Footnotes

  1. REST API endpoints for notifications - GitHub Docs: Notification Reasons

@meiji163
Copy link
Owner

meiji163 commented Mar 8, 2024

great!

abbreviate repo name if too long; show relative time under 24h; move unread_symbol to the first field
@LangLangBart
Copy link
Collaborator Author

LangLangBart commented Mar 9, 2024

Move the unread_symbol to the first field and make the timestamp relative for updates made <24h ago.


Long repo names are abbreviated, for example:

  • shd101wyy/vscode-markdown-preview-enhanced becomes shd101wyy/vscode-markdown…

The reason is now positioned after the number in a subtle gray tone, and the type is
highlighted in white_bold. This reordering and color changes should enhance readability and
optimize what immediately catches the eye.

@LangLangBart LangLangBart merged commit 655bb37 into main Mar 12, 2024
1 check passed
@LangLangBart LangLangBart deleted the reason branch March 12, 2024 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants