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

Improving sidebar navigation on a scoped page #10361

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

salman-neslit
Copy link
Collaborator

@salman-neslit salman-neslit commented Dec 18, 2024

Link to Issue

Closes: #7988

Description of Changes

  • Update topic naming conventions to show relevant icons for gated topics, active contests, or both.
  • Changes order of toggle.

"How We Fixed It"

Test Plan

  • Go to community page.
  • Verify that topic are sorted in alphabetical order.
  • Verify the topic icon conventions.
    • When a topic is created the default is the “#,”
    • When A topic is gated, it has a lock icon.
    • If the topic is in an active contest, it will have a trophy icon.
    • If a topic is gated AND active contest, the trophy icon is used.

Deployment Plan

Other Considerations

… into salman/issue#7988/improving-sidebar-navigation-on-ascope-page
… into salman/issue#7988/improving-sidebar-navigation-on-ascope-page
@salman-neslit salman-neslit marked this pull request as ready for review January 9, 2025 14:47
Copy link
Contributor

@masvelio masvelio left a comment

Choose a reason for hiding this comment

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

looks like icons are not nicely centered vertically

image

approving in advance, please fix my comments

Comment on lines +143 to +145
} else if (topic.weighted_voting) {
leftIcon = <CWIcon iconName="lockedNew" iconSize="small" />;
} else {
Copy link
Contributor

@mzparacha mzparacha Jan 13, 2025

Choose a reason for hiding this comment

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

weighted voting and topic gating are 2 separate features. Checkout the logic in useTopicGating for using this icon for a gated topic.

Comment on lines +141 to +148
if (topicInvolvedInActiveContest) {
leftIcon = <CWIcon iconName="trophy" iconSize="small" />;
} else if (topic.weighted_voting) {
leftIcon = <CWIcon iconName="lockedNew" iconSize="small" />;
} else {
leftIcon = <CWIcon iconName="hash" iconSize="small" />;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

i think the order of this block should be reversed, just so the icons are set in the precedence specified in PR description

Verify the topic icon conventions.
When a topic is created the default is the “#,”
When A topic is gated, it has a lock icon.
If the topic is in an active contest, it will have a trophy icon.
If a topic is gated AND active contest, the trophy icon is used.

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.

Improving sidebar navigation on a scoped page
3 participants