Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clicking on an avatar shows a sliding pane with user details (#78)
* Introduce a new UserProfileSlidingPane, which fades in from the right side of the screen when the user clicks on an Avatar (big or small). * Room avatars do not enable this action, as clicking on a room avatar should open the room itself instead. * This borrows some button designs from Moxin, which show nice SVG icons next to the button text. * These buttons are not yet functional; that will be added shortly. * The flow of events now works like this: 1. User clicks on an Avatar 2. The `Avatar` widget handles that click and emits a `ShowUserProfileAction` 3. The `RoomScreen` widget handles that action, sets the info for the `UserProfileSlidingPane`, and then shows that sliding pane. 4. The user views the pane, and clicks the close button (or pressed back/Esc, etc), returning them to the RoomScreen. * Redesigned how the Avatar works to be a bit more flexible, e.g., it now accepts any username or User ID string and still display the first non-'@' grapheme. * Avatars also store data about the user they're displaying, which enables them to be self-sufficient when handling actions like being clicked. * Reorganize imports and `live_design()` invocations in each module group. * Still need to fix a few things: * Setting the width of the sliding pane to be a percentage of the parent window's width * Making sure that events are not forwarded to the hidden RoomScreen beneath the UserProfileSlidingPane * Hide the sliding pane if the user clicks/taps outside of its bounds (e.g., like a Modal) * Implement the button actions * Properly query and display the user's role (power level) in the current room.
- Loading branch information