Skip to content
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

[IMP] pivot: add indentation to row headers #4961

Closed
wants to merge 2 commits into from

Conversation

hokolomopo
Copy link
Contributor

Description:

[IMP] pivot: add indentation to row headers

This commit adds indentation to row headers in the pivot table, based
on the depth of the groupBy.

[IMP] format: add the handling of repeated character

This commit adds the handling of the * asterisk character in the format,
which repeats the character that comes after it enough times to fill
the column.

The asterisk is ignored in cell.formattedValue, and the character is
only repeated if the formatValue helper is given a width parameter,
which we now do only in the grid renderer.

The commit also adds this new format feature to the accounting format,
to match the behaviour of the other spreadsheet applications.

Task: 3965246

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

@robodoo
Copy link
Collaborator

robodoo commented Sep 10, 2024

Pull request status dashboard

@hokolomopo hokolomopo force-pushed the master-format-repeat-char-adrm branch from 02fce1c to b24c13d Compare September 10, 2024 09:12
@hokolomopo
Copy link
Contributor Author

So the issue is that I only use the repeated character to fill the empty space of the column. But the char has a discrete width, so we end up with things that aren't perfectly aligned, and that can be a bit ugly
image

  1. Just leave it like that ATM, and maybe in the future improve it
  2. Do like GSheet & Excel, and add an "empty space" at the end of the repeated characters so that it's perfectly aligned. It sounds kind of annoying to implement TBH (maybe some kind of rich text ?)

src/helpers/format/format.ts Outdated Show resolved Hide resolved
src/plugins/ui_feature/ui_sheet.ts Outdated Show resolved Hide resolved
src/helpers/format/format.ts Show resolved Hide resolved
src/types/pivot.ts Outdated Show resolved Hide resolved
@hokolomopo hokolomopo force-pushed the master-format-repeat-char-adrm branch from b24c13d to a259d01 Compare September 16, 2024 12:39
src/helpers/format/format.ts Show resolved Hide resolved
src/helpers/pivot/pivot_helpers.ts Show resolved Hide resolved
src/functions/module_lookup.ts Outdated Show resolved Hide resolved
src/helpers/pivot/pivot_time_adapter.ts Show resolved Hide resolved
src/helpers/format/format.ts Show resolved Hide resolved
src/helpers/format/format.ts Show resolved Hide resolved
This commit adds the handling of the `*` asterisk character in the format,
which repeats the character that comes after it enough times to fill
the column.

The asterisk is ignored in `cell.formattedValue`, and the character is
only repeated if the `formatValue` helper is given a `width` parameter,
which we now do only in the grid renderer.

The commit also adds this new format feature to the accounting format,
to match the behaviour of the other spreadsheet applications.

Task: 3965246
This commit adds indentation to row headers in the pivot table, based
on the depth of the groupBy.

Task: 3965246
@hokolomopo hokolomopo force-pushed the master-format-repeat-char-adrm branch from a259d01 to 9777e59 Compare September 17, 2024 11:46
Copy link
Collaborator

@LucasLefevre LucasLefevre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

robodoo rebase-ff r+

@robodoo
Copy link
Collaborator

robodoo commented Sep 17, 2024

Merge method set to rebase and fast-forward.

robodoo pushed a commit that referenced this pull request Sep 17, 2024
This commit adds the handling of the `*` asterisk character in the format,
which repeats the character that comes after it enough times to fill
the column.

The asterisk is ignored in `cell.formattedValue`, and the character is
only repeated if the `formatValue` helper is given a `width` parameter,
which we now do only in the grid renderer.

The commit also adds this new format feature to the accounting format,
to match the behaviour of the other spreadsheet applications.

Task: 3965246
Part-of: #4961
Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 17, 2024
This commit adds indentation to row headers in the pivot table, based
on the depth of the groupBy.

closes #4961

Task: 3965246
Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
@robodoo robodoo closed this Sep 17, 2024
@robodoo robodoo added the 17.5 label Sep 17, 2024
@fw-bot fw-bot deleted the master-format-repeat-char-adrm branch October 1, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants