Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: set icons for each type of notification#17115

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 9 commits intomainfrombq/notification-icons
Mar 31, 2025

Conversation

BrunoQuaresma
Copy link
Collaborator

Each notification type will have an icon to represent the context:

Screenshot 2025-03-26 at 13 44 35

This depends on#17013

@BrunoQuaresmaBrunoQuaresma requested review fromdefelmnq anda teamMarch 26, 2025 16:46
@BrunoQuaresmaBrunoQuaresma self-assigned thisMar 26, 2025
@BrunoQuaresmaBrunoQuaresma requested review frombrettkolodny and removed request fora teamMarch 26, 2025 16:46
cdr-bot[bot]
cdr-botbot previously approved these changesMar 26, 2025
Copy link

@cdr-botcdr-botbot left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This PR is no longer a hotfix.

  • ✅ Base is main or release branch
  • ✅ Has hotfix label
  • ✅ Head is from coder/coder
  • ❌ Less than 100 lines

@BrunoQuaresmaBrunoQuaresma removed the request for review frombrettkolodnyMarch 26, 2025 16:47
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@defelmnq merged the backend sidehere. Please rebase this PR to verify if icons are rendered correctly.

@@ -61,6 +61,7 @@ export const Markdown: Story = {
url: "https://dev.coder.com/workspaces?filter=template%3Acoder-with-ai",
},
],
icon: "DEFAULT_TEMPLATE_ICON",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@BrunoQuaresma We changed the format to "DEFAULT_ICON_*".

};

export const InboxAvatar: FC<InboxAvatarProps> = ({ icon }) => {
return <Avatar variant="icon">{inboxIcons[icon]}</Avatar>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We need to make it future proof, so theoretically icon can be either a custom image link or "DEFAULT_ICON_*"

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Since we don't have plans for that I would not add that. I really like to avoid adding code to handle scenarios were are not planned to happen any time soon.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actually this is how backend is implemented, so when the notification icon has custom url, backend will return it. Frontend must be compliant here.

BrunoQuaresma reacted with thumbs up emoji
@cdr-botcdr-botbot dismissed theirstale reviewMarch 28, 2025 19:30

This PR is no longer a hotfix.

@BrunoQuaresma
Copy link
CollaboratorAuthor

@mtojek I updated the codersdk types to better represent the logic and values.

Targets []uuid.UUID `json:"targets" format:"uuid"`
Title string `json:"title"`
Content string `json:"content"`
Icon InboxNotificationFallbackIcon `json:"icon"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I understand the idea behind - and love it. Unfortunately due to the fact that it can be a value different from the const list defined - I am not sure we want to keep it.

BrunoQuaresma reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Oh you're right! I missed it.

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Reverting the enums....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

An alternative option could be introducing a second propertyIconPath. Then,Icon can be used for default/fallback icons, andIconPath for custom src.

We can think about it in a follow up, not sure if this will make the API clean.

Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thank you very much, Bruno!

BrunoQuaresma reacted with heart emoji
Copy link
Contributor

@defelmnqdefelmnq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

All good for backend ! ✅

@BrunoQuaresmaBrunoQuaresma merged commit489641d intomainMar 31, 2025
33 checks passed
@BrunoQuaresmaBrunoQuaresma deleted the bq/notification-icons branchMarch 31, 2025 12:40
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 31, 2025
@codercoder deleted a comment fromBrunoQuaresmaMar 31, 2025
@matifali
Copy link
Member

/cherry-pick release/2.21

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mtojekmtojekmtojek approved these changes

@defelmnqdefelmnqdefelmnq approved these changes

@cdr-botcdr-bot[bot]cdr-bot[bot] left review comments

Assignees

@BrunoQuaresmaBrunoQuaresma

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@BrunoQuaresma@matifali@mtojek@defelmnq

[8]ページ先頭

©2009-2025 Movatter.jp