Closed Step7750 closed 6 years ago
This should probably also provide a button to create new communities
Perhaps toggle the sidebar when a button is clicked. It's pretty clunky on mobile otherwise.
Yup. Thankfully, Angular Material already provides the toggle sidebar functionality for mobile/ when the screen gets resized to a smaller width.
If a user creates a community, do they become the "moderator" of the community (ex. they can change the name of the community, delete community, etc.)?
They'd be the "owner" which would have privileges above moderators if we implemented that. We currently don't have an interface planned for managing your created communities.
Oh okay. I've setup the sidebar to allow users to favourite communities, and display favourited communities before the top communities. How would we determine which communities are considered the "top" communities?
Sort by most favourited? I'll make an issue for a server call to do that, it is documented in the API layout.
I created a list of favourited communities, above the list of top communities. There is a strange bug where if I want to unfavourite one of the favourited communities from the favourited communities list, it removes the favourited community from list of favourites (which is good), but also refreshes the page... not sure why the refreshing happens.
I replied to your PR with a fix that should resolve the issue. Let me know if it doesn't.
Yup, I made the changes and it works now; thanks!
Also, I wanted to give users a convenient way of managing their favourited communities from the navigation sidebar, so that they can easily favourite/unfavourite communities. We can remove this option if it doesn't have much use, since I know we are also implementing a favourite button on each individual community page.
In order to sort the communities on the side navigation bar, should we add a "favouriteCount" property on the community object?
export interface Community {
name: string;
title: string;
description?: string;
sidebar?: string;
nsfw?: boolean;
creatorId: number;
favouriteCount: number;
}
When you retrieve the communities from the community service, it is sorted before it is sent to you (https://github.com/MemePlace/Frontend/blob/master/src/app/api/community.service.ts#L38). The server handles that so all you need to do is just call that method with sort method top
and X count.
Allows the user to easily click communities that they have favourited with a possible interface for allowing them to see the Top X communities or maybe ones that may be relevant to them.