nextcloud / nextcloud/mail

Retain envelope thread action on top right when switching between multiple threads

Open
#10,720 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement skill:frontend
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Is your feature request related to a problem? Please describe.

The actions on the top right are reloaded each time a new thread is opened. The problem is that the actions menu needs to calculate the available width first and then decide how many buttons it can inline.

Navigating to another thread causes a full re-render of the whole right pane which causes this recalculation to happen over and over again.

Describe the solution you'd like

The available horizontal space doesn't change when navigation between threads so the menu shouldn't need to recalculate which actions to put inline. It should not jump around or flicker each time I switch to another thread.

Describe alternatives you've considered

No response

Additional context

I'm not sure if the effort is worth it. The only way I could image, is to keep the thread header alive and only render the content inside via the router. This way, the thread header and actions would stay "static" and only the contents would be re-rendered each time. However, this would require extensive code changes as the route is currently replacing everything in the right pane on navigation.

Another way would be to hack the NcActions component and somehow cache the amount of inline actions if the screen's width did not change since last time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the right-pane route navigation and the thread header render path, then inspect the NcActions component to reproduce the recalculation and flicker when switching threads. The work is done when the top-right thread actions remain stable across thread navigation without recalculating solely because the content changed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.