bocoup / blocks-capacity-planner

An airtable block for matching supply to demand in an airtable base.
MIT License
3 stars 3 forks source link

Improve UI flexibility #22

Closed jugglinmike closed 4 years ago

jugglinmike commented 4 years ago

For any given shift, ensure that every restaurant can be viewed alongside any hospital.

Previously, the hospital list dictated the height of each shift. This accommodated assignment in cases where there were more restaurants than hospitals as in the following wireframe:

.----------------------------------------------------. |^|
| (shift title)                                      | | |
| .----------------------.                           | | |
| |                    |^|                           | | |
| | (restaurants)      | |    (hospitals)            | | |
| |                    |v|                           | | |
| '----------------------'                           | | |
'----------------------------------------------------' | |
.----------------------------------------------------. | |
| (shift title)                                      | |v|
----------------------------------------------------------
  (tools)                            (budget)

However, when there were more hospitals than restaraunts, every restaurant could not necessarily be viewed alongside every hospital:

| | (final restaurant)   |                           | |^|
| '----------------------'                           | | |
|                                                    | | |
|                                                    | | |
|                           (final hospital)         | | |
'----------------------------------------------------' | |
.----------------------------------------------------. | |
| (shift title)                                      | |v|
----------------------------------------------------------
  (tools)                            (budget)

In a drag-and-drop interface such as this, it is critical for every draggable element (restaurants) to be visible alongside every drop target (hospital).

Alter the layout such that every shift is always completely visible and that both the list of restaurants and the list of hospitals is presented with a scroll bar whenever their contents exceed the available vertical space:

.----------------------------------------------------. |^|
| (shift title)                                      | | |
| .----------------------.  .----------------------. | | |
| |                    |^|  |                    |^| | | |
| | (restaurants)      | |  | (hospitals)        | | | | |
| |                    |v|  |                    |v| | | |
| '----------------------'  '----------------------' | | |
'----------------------------------------------------' | |
.----------------------------------------------------. | |
| (shift title)                                      | |v|
----------------------------------------------------------
  (tools)                            (budget)
jesarshah commented 4 years ago

Open question: does this solve the min height issue from @susanpark 's design?

jugglinmike commented 4 years ago

I've resolved the conflicts from recent changes to the dev branch and further extended the solution to eliminate unused space.

rmeritz commented 4 years ago

@jugglinmike - I checkout the branch locally and tried it out in the Capacity Planning Example Base and things look really weird and broken.

screencapture-airtable-tblnz9rumCvnTdN3K-viwYh7lzHleDrGhix-2020-05-20-10_29_12

jugglinmike commented 4 years ago

Nice catch, @rmeritz. I didn't account for situations with such a small number of consumers. That should be fixed, now--mind taking another look?

rmeritz commented 4 years ago

@jugglinmike - The Consumers look fine to be now. But now I'm not seeing any Producers at all, but I just fetched the lastest dev and I have the same problem there. I'm not getting any restaurants to show up anymore in block. This is probably good to go my I'm going to figure out what my issue is tomorrow morning with fresh eyes.