Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LineUp 4: Collapsed groups are larger in overview mode than in normal mode #365

Closed
thinkh opened this issue May 13, 2020 · 2 comments
Closed
Assignees
Labels
type: bug Something isn't working

Comments

@thinkh
Copy link
Member

thinkh commented May 13, 2020

  • Release number or git hash: master, develop, and lineupjs4
  • Web browser version and OS: Chrome 81
  • Environment (local or deployed): both

Steps to reproduce

  1. Open https://ordino-daily.caleydoapp.org/
  2. Open list of all cell lines
  3. Group/stratify by tumor type
  4. Collapse groups
  5. Activate overview mode

Observed behavior

Grouping in normal mode

grafik

Grouing in overview mode

grafik

-> The collapsed groups take more space than in normal mode. This is unintuitive since the aim of the overview mode is to get as much information as possible on the screen.

Expected behavior

The collapsed rows should be the same size or smaller in overview mode.

Side note

In the LineUp 4 demo the group height is consistent indepent of the overview mode.

grafik

grafik

@thinkh thinkh added the type: bug Something isn't working label May 13, 2020
@thinkh thinkh self-assigned this May 13, 2020
@thinkh
Copy link
Member Author

thinkh commented May 13, 2020

The investigation shows that we override/set a different group height in tdp_core.

The default group height from LineUp is 40 pixel.

We override/set this value in the LineUpPanelActions with 70 pixel for the overview mode.

export const rule = spaceFillingRule({
groupHeight: 70,
rowHeight: 18,
groupPadding: 5
});

Furthermore, I found another value of 70 pixel if the itemRowHeight option in ARankingView is a function.

if (typeof this.options.itemRowHeight === 'number' && this.options.itemRowHeight > 0) {
config.rowHeight = this.options.itemRowHeight;
} else if (typeof this.options.itemRowHeight === 'function') {
const f = this.options.itemRowHeight;
config.dynamicHeight = () => ({
defaultHeight: 18,
padding: () => 0,
height: (item: IGroupItem | IGroupData) => {
return isGroup(item) ? 70 : f((<Partial<IDataRow & IGroupItem>>item).v, (<Partial<IDataRow & IGroupItem>>item).i);
}
});
}

We should refactor this and use the LineUp default value of 40 pixel for the group height.

@mstreit
Copy link
Member

mstreit commented May 13, 2020

That's a very useful improvement, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants