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

[ Feature Request ] [ FlexibleColumnLayout ] Need custom size for difference layout #1972

Closed
alex-zhang opened this issue Jul 22, 2020 · 10 comments · Fixed by #1987
Closed
Assignees
Labels
enhancement New feature or request SAP SF

Comments

@alex-zhang
Copy link

alex-zhang commented Jul 22, 2020

hi,

Thanks for the new component FlexibleColumnLayout.

But there's a little gap with requirement. (below)

captured

To achieve this effect, i change the default layout size value.

image

So, Is there any possible to expose the "setLayoutsByMedia" method to change the default size value?

And below is our UX design:

image
image

@vladitasev
Copy link
Contributor

Hi @alex-zhang ,

The values are per the fiori design, but we'll find some solution, even if unofficial, to support you with that requirement.

Regards,
Vladi

@vladitasev vladitasev added enhancement New feature or request SAP SF labels Jul 23, 2020
@alex-zhang
Copy link
Author

hi, @vladitasev

Thanks for your quick action.

@vladitasev
Copy link
Contributor

Hi @alex-zhang

  1. Regarding the possibility to change the ratios - please see the PR above. It would allow usage such as:
<ui5-flexible-column-layout _smaller-column-size-two-columns="20">

which would make two-column ratios 20/80 and 80/20, rather than 33/67 and 67/33.
A similar param exists for three-column ratios, if needed.

  1. Regarding changing the "TwoColumnsMidExpanded" layout to 0/100/0 - this is not necessary. There already exists a layout for this, called MidColumnFullScreen. Same for 0/0/100, and it's called EndColumnFullScreen. And of course, the default layout called OneColumn is 100/0/0. So you already have the options to show one of the columns only, when needed.

So please let us know - if we merge the above PR that would let you change ratios - point 1), and knowing that you can use the single-column layouts, described in point 2), would that let you fulfill your requirements?

Regards,
Vladi

@vladitasev vladitasev self-assigned this Jul 23, 2020
@alex-zhang
Copy link
Author

alex-zhang commented Jul 24, 2020

hi, @vladitasev

thanks for your information.

Regarding changing the TwoColumnsMidExpanded layout to 0/100/0 - this is not necessary. There already exists a layout for this, called MidColumnFullScreen. Same for 0/0/100, and it's called EndColumnFullScreen.

For this picture below it's a TwoColumnsStartExpanded layout and It's ratio in desktop and tablet is [20%, 80%, 0] MG 1
After the user click the expand button it will changed to the TwoColumnsMidExpanded layout and now it ratio in desktop and tablet is [0, 100%, 0]. IMG 2 But here we can't use the MidColumnFullScreen instead of TwoColumnsMidExpanded because the expand button is still needs here.

So , for point2, there may difference size. [20%, 80%, 0] for TwoColumnsStartExpanded and [0, 100%, 0] for TwoColumnsMidExpanded

if we use this logic

const bigTwo = 100 - smallTwo; // 67% by spec
it will not achieve the target.

Otherwise, This is an other option for me On top of this PR. Here is my step:

  1. I set the default layout to TwoColumnsStartExpanded and the _smaller-column-size-two-columns="20"
  2. i listen to the layout-change event, if the layout is changed to TwoColumnsMidExpanded i set the _smaller-column-size-two-columns="0"

I'm not sure is that ok. And there is also different logic for phone size.

IMG 1

image

IMG 2

image

@alex-zhang
Copy link
Author

alex-zhang commented Jul 24, 2020

BTW

For this code

static get BREAKPOINTS() {
return {
"M": 960,
"L": 1280,
};
}

according to fiori design https://wiki.wdf.sap.corp/wiki/pages/viewpage.action?pageId=2038570628

  S: '(max-width: 599px)',

  M: '(min-width: 600px) and (max-width: 1023px)',

  L: '(min-width: 1024px) and (max-width: 1439px)',

  XL: '(min-width: 1440px)'

So, we should follow the guide line?

@ilhan007
Copy link
Member

Yes, the breakpoints

BTW

For this code

static get BREAKPOINTS() {
return {
"M": 960,
"L": 1280,
};
}

according to fiori design https://wiki.wdf.sap.corp/wiki/pages/viewpage.action?pageId=2038570628

  S: '(max-width: 599px)',

  M: '(min-width: 600px) and (max-width: 1023px)',

  L: '(min-width: 1024px) and (max-width: 1439px)',

  XL: '(min-width: 1440px)'

So, we should follow the guide line?

Yes, we should, change is prepared: #1984

@alex-zhang
Copy link
Author

ok, thanks.

@alex-zhang
Copy link
Author

alex-zhang commented Jul 27, 2020

hi, @vladitasev @ilhan007

how about the question above.

So , for point2, there may difference size. [20%, 80%, 0] for TwoColumnsStartExpanded and [0, 100%, 0] for TwoColumnsMidExpanded

@vladitasev
Copy link
Contributor

Hi @alex-zhang

We merged the breakpoints change PR, and there is also a new PR regarding more freedom in changing layouts: #1987

Please let us know if that would work for you

Regards,
Vladi

ilhan007 added a commit that referenced this issue Jul 27, 2020
The media breakpoints are now aligned with the Fiori 3 specs.

Related to: #1972
@alex-zhang
Copy link
Author

@vladitasev

ok, thanks. Great. It will be flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SAP SF
Projects
None yet
3 participants