zulip-terminal
zulip-terminal copied to clipboard
Unify confirmation popups into popup framework
What does this PR do, and why?
This incrementally improves the popup code until a point where the confirmation popups can be handled in the same way as others and improved upon:
- extract the border styling from core.py and into a new
PopUpFrameclass in view.py - extend
PopUpFrameto handle title-less cases (ie. for confirmation popups) - simplify confirmation popups to not support locations other than center, easing integration
- migrate
ConfirmationPopUpViewfrom anOverlayto aFrame, and other changes to enable use ofshow_pop_upjust like other popups
Other than simplifying the code, this also results in confirmation popups acquiring a solid edge, as with regular popups.
Outstanding aspect(s)
- [ ] Last commit needs more consideration
- [ ] Nesting of popups into frame suggests frame could be an urwid container/decorator class
- [ ] Confirm ability to style popup borders
- [ ] Select appropriate popup borders for different confirmation popups?
External discussion & connections
- [ ] Discussed in #zulip-terminal in
topic - [ ] Fully fixes #
- [ ] 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?
- [ ] Manually - Behavioral changes
- [ ] 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
- [ ] It is a minimal coherent idea
- [ ] It has a commit summary following the documented style (title & body)
- [ ] It has a commit summary describing the motivation and reasoning for the change
- [ ] It individually passes linting and tests
- [ ] It contains test additions for any new behavior
- [ ] It flows clearly from a previous branch commit, and/or prepares for the next commit