Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

BPartner/Location/Contact widget layout issue #568

Closed
teosarca opened this issue Mar 22, 2017 · 10 comments
Closed

BPartner/Location/Contact widget layout issue #568

teosarca opened this issue Mar 22, 2017 · 10 comments

Comments

@teosarca
Copy link
Member

Current behavior

When the Contact is missing the Location is aligned to the right, were usually the contact shall be.

Expected behavior

Always preserve the location position (i.e. keep it in the middle).

Steps to reproduce

  • createa new sales order
  • set the bpartner, so everything will be filled
  • take a look at Bill BPartner/Location/Contact field

image

@teosarca teosarca added this to the 2017-13 milestone Mar 22, 2017
@damianprzygodzki damianprzygodzki self-assigned this Mar 23, 2017
@damianprzygodzki
Copy link
Contributor

damianprzygodzki commented Mar 23, 2017

Is it okay?
screen shot 2017-03-23 at 09 31 54

screen shot 2017-03-23 at 09 32 05

screen shot 2017-03-23 at 09 33 01

And when we have only one param :

screen shot 2017-03-23 at 09 39 16

And secondary one:

screen shot 2017-03-23 at 09 41 21

@metas-mk
Copy link
Member

Hi @damianprzygodzki yes thats fine, thx.
besides the product packing screenshot. the combined product packing field has a larger "product" part 2/3 to 1/3 i would say roughly.

@teosarca
Copy link
Member Author

thanks for take care.

i think we need more info in order to decide. Wondering how i are layouting those "composed" widgets?
I mean, how do u distinguish between "partner/location/contact" and "product/packingMaterial"...
Mark was suggesting, in case of "product/packingMaterial" to have have something like 1/3 for product and 2/3 for packingMaterial.
Now i am just wondering if this information shall come from backend or not, i.e. part of the layout response.
Wdyt?

@damianprzygodzki
Copy link
Contributor

In my opinion we should define one consistent layout for all lookups. Or some rules, how to resize that.

  • the first field, cannot has a ellipsis (it is text input) and be flexible while editing.
  • we should remember that layout should be scalable, so it should work for every setup, doesnt matter how many fields you return from API

@damianprzygodzki
Copy link
Contributor

damianprzygodzki commented Mar 23, 2017

Now i am just wondering if this information shall come from backend or not, i.e. part of the layout response.

It shouldnt be. At all i think. As i said, it should be generic and consistent rule.

EDIT: If you really want to decide from API about ratio, we can create some property in layout for widgets like size or ratio but in my opinion it is redundant and not complex for other widgets layouting.

I mean, how do u distinguish between "partner/location/contact" and "product/packingMaterial"...

I do not distinguish. I am dividing it roughly 1:1 (the text input and container for rest fields) but leaving it to be flexible with rules:

  • text input should be at least 30% width
  • rest fields should be at least 50% width
  • each of rest fields should has ratio 1:1 to other fields

@teosarca
Copy link
Member Author

teosarca commented Mar 23, 2017

I would also ask Mark about this.
But reading this discussion, my feeling is that we won't be able to have a general rule.
I can see following cases (but there might be more!):

  1. Bpartner/location/address
  2. BPartner/location
  3. Product/PackingMaterial

I somehow have the feeling that 2. and 3. would have a different layout...

@cadavre
Copy link
Contributor

cadavre commented Mar 23, 2017

I guess that /layout shall define how many fields there will be. I.e. if you have BusinessPartner with 3 fields and InvoicePartner with 2 fields but first two are corresponding to BusinessPartner – if you want them to see identically you should send layout with three fields and always keep 3rd empty. It's kind obvious that in case of Product/PackingMaterial (always 2) we want to have 2nd field maxed to right instead of centered.

Current implementation on front-end is this way PROPER. It's up to API's /layout how to render it.

@teosarca
Copy link
Member Author

The API is sending them as you described.
But the "thing" is not there, also have to consult with Mark.
The thing is that we might want the case 2. and 3. (which from frontend's point of view, there is NO difference, 2 fields provided in layout) to be rendered in different proportions just because usually the location is bigger and usually the PackingMaterial is a short text.

@metas-mk
Copy link
Member

metas-mk commented Apr 5, 2017

@teosarca @damianprzygodzki @cadavre
seems to be the similar discussion as this one #468. let's find a combined solution for both.

@metas-mk metas-mk modified the milestones: 2017-15, 2017-13 Apr 5, 2017
@cadavre cadavre modified the milestones: 2017-17, 2017-15 Apr 19, 2017
@cadavre
Copy link
Contributor

cadavre commented Apr 19, 2017

Closing due to revamp in #600 .

@cadavre cadavre closed this as completed Apr 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants