flarum / flarum/issue-archive

Move DiscussionListPane out of DiscussionPage

Open
#176 1 comment 0 reactions 0 assignees View on GitHub
org/keep
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Feature Request

By doing so we can increase rendering performance, so the `DiscussionListPane` doesn't need to fully rerender when switching discussions.

**Describe the solution you'd like**
I suggest we put it inside an `AppNavigation ` component, where we also render the mobile top header conditionally. We could return an `ItemList` so people can also extend and add custom Navigation components like a mobile bottom navigation.

![image](https://user-images.githubusercontent.com/36057469/97195314-c7aac180-17dd-11eb-8b57-11107e13771e.png)

```js
export default class AppNavigation extends Component {
view() {
const isMobile = app.screen === 'phone';

return [
isMobile && ,
,
];
}
}

export default class AppTopNav extends Component {
view() {
return (


{Navigation.component({ className: 'App-backControl', drawer: true })}

);
}
}

export default class AppSideNav extends Component {
view() {
const isMobile = app.screen === 'phone';
const isDiscussionPage = app.current.matches(DiscussionPage);

return (


{isDiscussionPage && !isMobile && }

);
}
}

Contributor guide

Open the contributing guide

Research direction

Locate DiscussionPage and DiscussionListPane first, then trace how the mobile top header and navigation are currently rendered. Review the proposed AppNavigation, AppTopNav, and AppSideNav structure before deciding where the list belongs. Done means switching discussions no longer fully rerenders DiscussionListPane, while the mobile header and extensible navigation still render conditionally.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, performance
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.