Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Revisit purchase list editor #133

Open
4 tasks done
dboehmer opened this issue Dec 17, 2020 · 7 comments · May be fixed by #183
Open
4 tasks done

Revisit purchase list editor #133

dboehmer opened this issue Dec 17, 2020 · 7 comments · May be fixed by #183
Assignees

Comments

@dboehmer
Copy link
Owner

dboehmer commented Dec 17, 2020

Not part of this issue:

  • list of purchase lists /purchase_lists

  • for now strategy desktop first, mobile will come later:-)

  • replace text in "remove" buttons with waste basket icon
    • by default grey
    • on hover red
  • tabular view with light grey lines, split long bullet list points in columns: total, date, dishes
    • not yet defined: display of dish comments: extra column??
    • all "remove" buttons vertically aligned
    • numbers (amount of items, amounts of dish ingredients) right aligned
  • move buttons for convertible units from far right to left, just below the current total amount+current unit (maybe smaller font size)
  • drop table column Convert to …
@rico-hengst
Copy link
Collaborator

Issue partially implemented!

Screenshot from 2021-01-03 17-38-02

Remarks see image:
Small button-group with including a form breaks button-group
The unit conversion via button close to the amount column is not finished (A).
The usage of a bootstrap button-group is preferred.
In this case the form include the button-group breaks the expected layout.
My suggestion:

  • modification of the controller to change units
  • controller dont uses form parameters
  • so we are able to create simple buttons in a button-group within onclick="window.location.href=controller...url"*

Convert column
... still exists (B)

Remove button
... was moved in front to dishes column (C)

Dishes column
... contains now a "inner" table (D). I think we should discuss the inner table dis-advantage!


Currently the columns of our different section tables are no well horizontal aligned, see C,D.

@dboehmer
Copy link
Owner Author

dboehmer commented Jan 9, 2021

My suggestion:

  • modification of the controller to change units
  • controller dont uses form parameters
  • so we are able to create simple buttons in a button-group within onclick="window.location.href=controller...url"

I’m not sure what you mean. The btn-group can’t contain multiple <form> with hidden inputs and submit buttons, right?

Well, the conversion is a data change and that must not happen via HTTP GET. I think the solution would be to give each submit button in the btn-group a unique name or value.

You’ve used <button>s instead of <input type="submit">. I think, you can give both a name and a value to each of them. So can you just replace the hidden inputs with a name/value attribute pair on the <button>?

(Later on [not in this issue] we can make such forms act with JavaScript and „Ajax“ and work without a complete page reload.)

@dboehmer
Copy link
Owner Author

dboehmer commented Jan 9, 2021

Dishes column
... contains now a "inner" table (D). I think we should discuss the inner table dis-advantage!

Currently the columns of our different section tables are no well horizontal aligned, see C,D.

Yeah, nested tables are a no-go. I’ve just checked it up in master: previously it was a <ul> in the <td>. I see 2 possible solutions:

  1. still a <li> button with invisible (no) bullet points (like in the nav bars)
  2. a table row for each dish ingedient and rowspan on all other columns, colspan=4 for the main table heading Dishes

Solution 1 will probably not allow to vertically align date, meal and dish. Do you feel like going for 2?

@dboehmer
Copy link
Owner Author

dboehmer commented Feb 3, 2021

I will assist you with:

  • enable button group to POST form for unit conversion
  • provide next lower and next higher number from controller for TT
  • provide a TT variable window_title that allows setting the <head><title> without setting the title in <body>

dboehmer added a commit that referenced this issue Mar 4, 2021
Possible combinations:

- $title for <head><title> and <body><h2>

- different $window_title and $html_title

- only $window_title

- only $html_title
@dboehmer
Copy link
Owner Author

dboehmer commented Mar 10, 2021

Currently the highlighted button for the current unit has no action but is clickable:

On page load: highlighted, clickable

image

After click:

image

I tried <button class="..." disabled> but then it’s not highlighted:

image

  • make button for current unit not clickable but highlighted

@dboehmer
Copy link
Owner Author

dboehmer commented Mar 10, 2021

  • fix whitespace

@dboehmer
Copy link
Owner Author

dboehmer commented Mar 17, 2021

We’ve just settled to drop our custom increase/decrease butttons. Instead we don’t hide the browser-builtin buttons.

Instead use defaultNumbers:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#offering_suggested_values

  • drop custom increase/decrease buttons
  • stop hiding the default increase/decrease buttons
  • provide next_lower_value and next_higher_value as defaultNumbers

kuro610 pushed a commit that referenced this issue Jun 1, 2022
Possible combinations:

- $title for <head><title> and <body><h2>

- different $window_title and $html_title

- only $window_title

- only $html_title
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants