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

Item mention notifications #1208

Merged
merged 8 commits into from
Jun 3, 2024
Merged

Item mention notifications #1208

merged 8 commits into from
Jun 3, 2024

Conversation

ekzyis
Copy link
Member

@ekzyis ekzyis commented May 29, 2024

Description

This adds notifications if one of your posts or comments were mentioned.

I also added parsing of references as #<itemId> to links so internal references are now linked both ways. This means that #1234 will now be parsed as a link to https://stacker.news/items/1234 (see d449d8b).

Related to #667 but doesn't close it since this PR is only about notifications

Screenshots

2024-05-31-102231_514x83_scrot

Additional Context

I initially wanted to include the type of item that was referred in the title. So if someone referred to a post of yours, it would show one of your posts was mentioned instead of one of your comments was mentioned. However, that made the code more complicated (see d974025).

I now use items to mean both but I think that's not a good name since it might be confusing for stackers what we mean by that. I thought about using "submissions" instead but that's a completely new term so maybe even more confusing.

Checklist

Are your changes backwards compatible? Please answer below:

Yes

Did you QA this? Could we deploy this straight to production? Please answer below:

Yes

For frontend changes: Tested on mobile? Please answer below:

Did you introduce any new environment variables? If so, call them out explicitly here:

@ekzyis ekzyis added the feature new product features that weren't there before label May 29, 2024
@ekzyis ekzyis marked this pull request as draft May 29, 2024 12:18
@ekzyis ekzyis force-pushed the item-mention-notifications branch 2 times, most recently from 0075532 to a059d8f Compare May 31, 2024 06:51
@ekzyis ekzyis marked this pull request as ready for review May 31, 2024 16:33
ekzyis added 8 commits May 31, 2024 11:34
Considering if the item that was referred to was a post or comment made the code more complex than initially necessary.

For example, notifications for /notifications are deduplicated based on item id and the same item could refer to posts and comments, so to include "one of your posts" or "one of your comments" in the title would require splitting notifications based on the type of referred item.

I didn't want to do this but also wanted to have consistent notification titles between push and /notifications, so I use "items" in both places now, even though I think using "items" isn't ideal from a user perspective. I think it might be confusing.
@ekzyis ekzyis force-pushed the item-mention-notifications branch from 730636b to d12b808 Compare May 31, 2024 16:34
@huumn huumn merged commit 2597eb5 into master Jun 3, 2024
6 checks passed
@huumn huumn deleted the item-mention-notifications branch June 3, 2024 17:12
@huumn
Copy link
Member

huumn commented Jun 4, 2024

I get a ton of false positives from #<num> being an item link now. I had five false positive item mentions this morning from people sharing github release notes.

I recall talking about this in the past and that we were going to wait until # autocompleted like @ ... it'd allow us to distinguish between someone saying "I'm #1" and someone want to share #1.

@ekzyis ekzyis mentioned this pull request Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new product features that weren't there before
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants