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

CodeSnippet: there should be a way to set the min number of rows when in closed and expanded mode #8056

Closed
guigueb opened this issue Mar 10, 2021 · 1 comment
Assignees
Labels
component: code-snippet proposal: active development This request is actively being worked during the current sprint. type: enhancement 💡

Comments

@guigueb
Copy link
Contributor

guigueb commented Mar 10, 2021

I have created #7579 for the maximum number of rows.
Please when adding props for this keep in mind they are for the minimum number of rows.
So use props like minClosedNumberOfRows and minExpandeNumberOfRows.

Summary

CodeSnippet: there should be a way to set the min number of rows when in closed and expanded mode

Currently in closed mode the CodeSnippet initially shows up 3 rows.
Currently in expanded mode the CodeSnippet shows as a minimum one more row than when the maximum when in closed mode.

Justification

Clients should have control over the minimum rows shown in closed and expanded states.

Desired UX and success metrics

When not given these are the default values to match the current values:
minClosedNumberOfRows: 3
minExpandedNumberOfRows: 16
From #7579
maxClosedNumberOfRows: 15
maxExpandedNumberOfRows: undefined (this is unlimited; which has unpredictable results - it should have a cap)

Testcase (props that would match current defaults):
Client wants...

  • a closed mode with a minimum of 3 lines which grows with the data to 15
  • an expanded mode with a minimum of 16 lines which grows with the data to forever, ever, ever....
    props={minClosed: 3, maxClosed: 15, minExpanded: 16, maxExpanded: undefined}

Testcase:
Client wants...

  • a closed mode with a minimum of 1 line which grows with the data to 5
  • an expanded mode with a minimum of 15 lines which grows with the data to 20 rows
    props={minClosed: 1, maxClosed: 5, minExpanded: 15, maxExpanded: 20}

Testcase:
Client wants...

  • a closed mode with a minimum of 10 line which does not grow but stays at 10
  • an expanded mode with a minimum of 11 lines which grows with the data to 20 rows
    props={minClosed: 10, maxClosed: 10, minExpanded: 11, maxExpanded: 20}

Testcase:
Client wants...

  • a closed mode with a minimum of 10 line which does not grow but stays at 10
  • an expanded mode with a minimum of 20 lines which grows with the data to 20 rows
    props={minClosed: 10, maxClosed: 10, minExpanded: 20, maxExpanded: 20}

"Must have" functionality

Pretty much need it all

Specific timeline issues / requests

Without the control over the layout on the screen IBM Cognos can not use CodeSnippet.
Because the minimum for both the closed is not fixed the layout jumps when the data changes.
We need control to set a specific height.

Available extra resources

What resources do you have to assist this effort?

Maybe.

@guigueb
Copy link
Contributor Author

guigueb commented Apr 7, 2021

The PR to deliver this has been merged.

@guigueb guigueb closed this as completed Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: code-snippet proposal: active development This request is actively being worked during the current sprint. type: enhancement 💡
Projects
None yet
Development

No branches or pull requests

2 participants