Channel Sidebar (UI): Difference between revisions
Created page with "The channel sidebar currently has two different states, "conversations" and "viewing server". == Conversations Sidebar == thumb|Conversations in [[Revite]] The conversations sidebar shows a short navigation menu to: * Home * Friends * Saved Notes With a list of direct messages below (descending order by last message ID with a fallback to channel ID). == Server Sidebar ==" |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
The channel sidebar currently has two different states, "conversations" and "viewing server". | The channel sidebar currently has two different states, "conversations" and "viewing server". | ||
== Conversations Sidebar == | == Conversations Sidebar == | ||
[[File:Conversations List.png|thumb|Conversations in [[Revite]]]] | [[File:Conversations List.png|thumb|Conversations in [[Revite]]]] | ||
The conversations sidebar shows a short navigation menu to: | The conversations sidebar shows a short navigation menu to: | ||
* [[Home (UI)|Home]] | * [[Home (UI)|Home]] | ||
* [[Friends (UI)|Friends]] | * [[Friends (UI)|Friends]] (hidden on mobile; shown in [[Bottom Navigation (UI)|Bottom Navigation]]) | ||
* [[Saved Notes (UI)|Saved Notes]] | * [[Saved Notes (UI)|Saved Notes]] | ||
With a list of direct messages below (descending order by last message ID with a fallback to channel ID). | |||
Line 19: | Line 17: | ||
== Server Sidebar == | == Server Sidebar == | ||
[[File:Server Sidebar.png|thumb|Server Sidebar in Revolt Frontend]] | |||
The server sidebar is composed of the server banner with the title on top, and a list of categories and channels below. | |||
Categories may be collapsed, and continue to show the active channels when collapsed. | |||
=== Ordered Channels Algorithm === | |||
# Initialise a set U of uncategorised channel IDs from server channels the client may access. | |||
# Initialise an empty list of categories C | |||
# If server.categories are defined, for each category: | |||
## Remove all the channels defined in the category from set U | |||
## Add category to list C | |||
# If the set U is not empty: | |||
## Find the "default" category if it exists in C | |||
## Merge the "default" category channels if they exist with and preceding the set U | |||
## Create a category with id="default" and add it to the start of the list C if it does not exist | |||
# Return the list C |
Latest revision as of 13:54, 15 January 2023
The channel sidebar currently has two different states, "conversations" and "viewing server".
Conversations Sidebar
The conversations sidebar shows a short navigation menu to:
- Home
- Friends (hidden on mobile; shown in Bottom Navigation)
- Saved Notes
With a list of direct messages below (descending order by last message ID with a fallback to channel ID).
Server Sidebar
The server sidebar is composed of the server banner with the title on top, and a list of categories and channels below.
Categories may be collapsed, and continue to show the active channels when collapsed.
Ordered Channels Algorithm
- Initialise a set U of uncategorised channel IDs from server channels the client may access.
- Initialise an empty list of categories C
- If server.categories are defined, for each category:
- Remove all the channels defined in the category from set U
- Add category to list C
- If the set U is not empty:
- Find the "default" category if it exists in C
- Merge the "default" category channels if they exist with and preceding the set U
- Create a category with id="default" and add it to the start of the list C if it does not exist
- Return the list C