zulip-terminal icon indicating copy to clipboard operation
zulip-terminal copied to clipboard

[WIP] Add DM panel to the left side view.

Open theViz343 opened this issue 1 year ago • 3 comments

What does this PR do, and why?

This PR is currently preparation for the addition of a collapsible DM panel in the left side UI view.

Outstanding aspect(s)

  • [ ]

External discussion & connections

  • [x] Discussed in #zulip-terminal in Private messages sidepanel
  • [x] Fully fixes #1197
  • [ ] Partially fixes issue #
  • [ ] Builds upon previous unmerged work in PR #
  • [ ] Is a follow-up to work in PR #
  • [ ] Requires merge of PR #
  • [ ] Merge will enable work on #

How did you test this?

  • [x] Manually - Behavioral changes
  • [x] Manually - Visual changes
  • [ ] Adapting existing automated tests
  • [ ] Adding automated tests for new behavior (or missing tests)
  • [ ] Existing automated tests should already cover this (only a refactor of tested code)

Self-review checklist for each commit

  • [x] It is a minimal coherent idea
  • [x] It has a commit summary following the documented style (title & body)
  • [x] It has a commit summary describing the motivation and reasoning for the change
  • [x] It individually passes linting and tests
  • [ ] It contains test additions for any new behavior
  • [x] It flows clearly from a previous branch commit, and/or prepares for the next commit

Visual changes

asciicast

theViz343 avatar Jul 07 '23 13:07 theViz343

Heads up @theViz343, we just merged some commits that conflict with the changes you made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/main branch and resolve your pull request's merge conflicts accordingly.

zulipbot avatar Sep 29 '23 01:09 zulipbot

The recent update to this PR addresses most of the earlier feedback.

The commits are now reordered so that the unread count functionality for the Stream Panel Button is added after the button's introduction.

I've removed the S hotkey from the early commits and only introduced it for the Stream Panel Button in the last commit which adds panel folding/unfolding. This might also benefit from some discussion on what to do for the current function of the S key (narrow to stream of the current message).

I've also addressed the focus position issue. Now, the earlier focused position should be focused on when folding/unfolding panels.

I've also added the user presence status to the DMButtons. A thing to note is that a DMButton is quite close in UI and functionality, to the UserButton class, with some differences such as the UserInfoView on pressing i and narrow to user vs opening compose box for user. This may warrant a parent class (still a child class of TopButton ) from which these two classes inherit. This may simplify the code a bit.

There are still a few tests to be added to cover the new code, but any initial testing is welcome :)

theViz343 avatar Feb 09 '24 00:02 theViz343

Heads up @theViz343, we just merged some commits that conflict with the changes you made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/main branch and resolve your pull request's merge conflicts accordingly.

zulipbot avatar Apr 17 '24 23:04 zulipbot