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

[Rails][React] Add the ability to "pin" a story so it shows up first on the StoryList #951

Open
rudokemper opened this issue Sep 23, 2023 · 3 comments
Assignees
Labels

Comments

@rudokemper
Copy link
Member

The Haudenosaunee community has requested that we add a feature to "pin" a story, so that it shows up first on the StoryList. Let's make it happen!

Let's go about this the following way:

  1. Create a new boolean in the Story model called storyPinned.
  2. In the CMS, for a logged in user with editor or admin permissions, add the ability to "pin" a story by showing a grayed out icon-pushpin from font-awesome to the right of a story title in the story dashboard edit view. Upon being clicked, the pushpin will turn to black, and the story will be set to storyPinned = true; any other story that was previously set to storyPinned = true will then be storyPinned = false.
  3. Once a story is "pinned", the story will have an icon-pushpin from font-awesome in the top right of a Story card upon hover over the card.
    image
  4. Upon hovering over the icon-pushpin, the icon should be highlighted with a box-shadow in the same way that the card is highlighted upon hover.
  5. Users with member permissions are able to see that a story is pinned, but can't themselves pin or unpin any stories. (And they do not see any hover box-shadow behavior.)
  6. Once clicked, the Story card should move to the top of the list (top left in the CMS).
  7. Additionally, on the application front end (/home/), the story should show first in the StoryList in the sidebar, regardless of how the story is sorted, and the icon-pushpin should show up in the top right here, too.
    image
  8. However, if either on the CMS side or the application front end, the stories are filtered in such a way that the pinned story does not meet the criteria, it should disappear from the list.
  9. In the CMS, once a story has been pinned, a user with editor or admin permissions can unpin the story by clicking on the icon-pushpin in the top right, which removes it from being pinned and returns it to its normal order in the list of stories.
  10. Default state is that no stories are pinned.

Bonus if the user can somehow see the "pinned" story move to the top of the list in the CMS (e.g. by briefly fading out from current position, and fading in to top level) -- and vice versa if unpinned -- but not necessary for completion.

@griseduardo
Copy link

Hello, I would like to work in this issue

@rudokemper
Copy link
Member Author

Thanks @griseduardo - I assigned you

@griseduardo
Copy link

Hello, I opened a pr related to this issue: #975

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants