Skip to content

Conversation

@aab-odoo
Copy link
Contributor

@aab-odoo aab-odoo commented Mar 5, 2024

New semantic kanban engine: no more weird 'js qweb stuff' in your backend views.

We started from this 'generic kanban template' and simplified it a bit to have a few new node-types:
image

Layout

Layout block in the image Node
column <aside>
Attributes: full​ (default: "false") to expand on card padding (e.g. res_partner)
main > header/body/footer <section>
By default, will have classnames "d-flex justify-content-between flex-column".
Attributes:type​ (optional) set to "row" to have class "flex-row"No need for footer/header, the first/last section would stick to top/bottom of the card
ribbon use a <widget> node with name="web_ribbon"​ almost anywhere in the template (like in form views)​.
Best practice would be to use it as direct child of the <kanban>​ node.
menu (not shown in the mockup) <menu>​injects the toggle in 'after title' section in the mockup (vertical ellipsis)
by default support any html and we encourage the use of button nodes and perhaps separator node with a string as a default sectioning mechanism; in addition to a default size in css? otherwise any custom html  + css is fine (we add a class on the dropdown menu to make css targetting easy)

New attributes on root node

global_click Default: true​ Replaces the oe_kanban_global_click​ / oe_kanban_global_click_edit​ logic
Around 27 kanban views where it must be set to disable the feature -> <kanban global_click="0">
color ​Optional.
Can be set to the field to use as color for the card border-left.
Replaces the kanban_color(record.color.raw_value)​ feature -> <kanban color="color">

Dropped features

  • ​kanban-tooltip​ template (3 usecases: gamification + 2x maintenance)
  • kanban_getcolorname​ not even translated
  • ​selection_mode​ (true is SelectCreateDialog), used to remove stuff -> automatically make the card inert in SelectCreateDialog (only allow to select the card)
    ​- widget.deletable​/ widget.editable​-> automatically disable type="delete"​/ type="edit"​buttons/links
  • all rendering context (record​ / widget​ / luxon​...)
  • qweb directives (t-if​/ t-esc​ ...) (t-if is replaced by invisible attribute)
  • automatically set  widget="many2many_tags" on many2many fields -> must be set in the arch now, like in list views
  • type="open" ​as since form views are always in edit mode, it opens the record in edit anyway (like type="edit"​)

@robodoo
Copy link
Contributor

robodoo commented Mar 5, 2024

Pull request status dashboard.

@C3POdoo C3POdoo added the RD research & development, internal work label Mar 5, 2024
@aab-odoo aab-odoo force-pushed the master-semantic-kanban-aab branch 2 times, most recently from 774c113 to 2a07ada Compare March 6, 2024 13:20
@bouvyd bouvyd force-pushed the master-semantic-kanban-aab branch 2 times, most recently from e47b3d4 to bb3a324 Compare March 14, 2024 08:37
@bouvyd bouvyd changed the title Master semantic kanban aab [WIP] web, *: semantic kanban view engine Mar 14, 2024
@aab-odoo aab-odoo force-pushed the master-semantic-kanban-aab branch 10 times, most recently from 441aa2a to 6c76432 Compare March 29, 2024 10:27
@aab-odoo aab-odoo force-pushed the master-semantic-kanban-aab branch from 6c76432 to c1fa514 Compare April 4, 2024 08:54
@aab-odoo aab-odoo force-pushed the master-semantic-kanban-aab branch from 7b4191a to 6801ca1 Compare April 29, 2024 10:11
@aab-odoo aab-odoo force-pushed the master-semantic-kanban-aab branch 7 times, most recently from ba2d7dd to 705eea5 Compare May 13, 2024 12:03
aab-odoo added 2 commits May 14, 2024 10:46
Before this commit, the arch shown from the getView debug menu
item was the one processed by the view arch parsers. As a
consequence, for form/list/kanban views at least, a `field_id`
attribute appeared on `<field>` nodes. This is a technical detail
added by the framework that we don't want to see in that screen.
This commit ensures we display the raw arch.
This commit optimizes a bit the flow of drag&dropping a kanban
record from a column to another. First, we prevent a mutation on
the list of records when the fromIndex equals the toIndex (i.e.
when it will have no impact on the list). Second, we ensure to
always give the same reference to the archiveRecord function to
KanbanRecord. Without it, each rendering of the KanbanRenderer
would produce the rendering of all of its KanbanRecords.
@aab-odoo aab-odoo force-pushed the master-semantic-kanban-aab branch from be4af5b to fe129aa Compare May 14, 2024 08:47
@aab-odoo aab-odoo force-pushed the master-semantic-kanban-aab branch from d1b0cba to 8018fd7 Compare May 15, 2024 06:01
@aab-odoo
Copy link
Contributor Author

Specs changed, new PR: #167751

@aab-odoo aab-odoo closed this Jun 14, 2024
@xmo-odoo xmo-odoo deleted the master-semantic-kanban-aab branch March 7, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RD research & development, internal work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants