-
Notifications
You must be signed in to change notification settings - Fork 30.3k
[WIP] web, *: semantic kanban view engine #156439
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
774c113 to
2a07ada
Compare
e47b3d4 to
bb3a324
Compare
fdardenne
reviewed
Mar 14, 2024
441aa2a to
6c76432
Compare
6c76432 to
c1fa514
Compare
7b4191a to
6801ca1
Compare
ba2d7dd to
705eea5
Compare
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.
This reverts commit 121ac408197dd0ae92c8d453c2b38dc1556f2c75.
be4af5b to
fe129aa
Compare
d1b0cba to
8018fd7
Compare
|
Specs changed, new PR: #167751 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

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:

Layout
<aside>Attributes: full (default: "false") to expand on card padding (e.g. res_partner)
<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
<widget>node withname="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>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
Around 27 kanban views where it must be set to disable the feature ->
<kanban global_click="0">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 translatedselection_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/linkst-ifis replaced byinvisibleattribute)widget="many2many_tags"on many2many fields -> must be set in the arch now, like in list viewstype="open"as since form views are always in edit mode, it opens the record in edit anyway (like type="edit")