mirror of
https://github.com/wassname/talk.git
synced 2026-08-10 12:41:02 +08:00
[CORL-1150] Discussions Tab (#3050)
* feat: Added Site.topStories edge * feat: Added User.ongoingDiscussions edge * connect discussions tab to relay * style discussions tab * add message if no ongoing discussions * style site name in story row * fix: make line-heights relative * add custom class hooks * feat: condition display based on feature flag * add target attribute to story links * fix: expose some featureFlags * fix: fixed sorting * fix: copy fixes Co-authored-by: tessalt <tessathornton@gmail.com> Co-authored-by: Chi Vinh Le <vinh@vinh.tech>
This commit is contained in:
co-authored by
tessalt
Chi Vinh Le
parent
9a9c92d360
commit
dfdea2b9d2
@@ -402,6 +402,11 @@ enum FEATURE_FLAG {
|
||||
in production environments.
|
||||
"""
|
||||
REDUCED_SECURITY_MODE
|
||||
|
||||
"""
|
||||
DISCUSSIONS will enable the discussions tab for the comment stream.
|
||||
"""
|
||||
DISCUSSIONS
|
||||
}
|
||||
|
||||
# The moderation mode of the site.
|
||||
@@ -1583,6 +1588,12 @@ type Site {
|
||||
"""
|
||||
canModerate: Boolean!
|
||||
|
||||
"""
|
||||
topStories will return stories that have had the most comments within the last
|
||||
24 hours on this Site.
|
||||
"""
|
||||
topStories(limit: Int = 5 @constraint(max: 5)): [Story!]!
|
||||
|
||||
"""
|
||||
createdAt is when the site was created.
|
||||
"""
|
||||
@@ -1754,7 +1765,7 @@ type Settings {
|
||||
"""
|
||||
featureFlags provides the enabled feature flags.
|
||||
"""
|
||||
featureFlags: [FEATURE_FLAG!]! @auth(roles: [ADMIN, MODERATOR])
|
||||
featureFlags: [FEATURE_FLAG!]!
|
||||
|
||||
"""
|
||||
createdAt is the time that the Settings was created at.
|
||||
@@ -2336,6 +2347,13 @@ type User {
|
||||
after: Cursor
|
||||
): CommentsConnection! @auth(roles: [ADMIN, MODERATOR])
|
||||
|
||||
"""
|
||||
ongoingDiscussions are stories where the given user has written comments in
|
||||
sorted by their last comment date.
|
||||
"""
|
||||
ongoingDiscussions(limit: Int = 5 @constraint(max: 5)): [Story!]!
|
||||
@auth(userIDField: "id", permit: [SUSPENDED, BANNED, PENDING_DELETION])
|
||||
|
||||
"""
|
||||
recentCommentHistory returns recent commenting history by the User.
|
||||
"""
|
||||
@@ -2429,6 +2447,7 @@ type User {
|
||||
ssoURL is the url for managing sso account
|
||||
"""
|
||||
ssoURL: String
|
||||
@auth(userIDField: "id", permit: [SUSPENDED, BANNED, PENDING_DELETION])
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user