Skip to content

Conversation

@rrahir
Copy link
Collaborator

@rrahir rrahir commented Nov 11, 2025

This commit introduces the possibility for the user to select the text content of the formula assistant.

Task: 5169514

Description:

description of this task, what is implemented and why it is implemented that way.

Task: 5169514

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 Nov 11, 2025

Pull request status dashboard

Copy link
Contributor

@hokolomopo hokolomopo left a comment

Choose a reason for hiding this comment

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

The feature sounds like composer hell 👀

<div class="o-formula-assistant-container user-select-none shadow">
<div
class="o-formula-assistant-container shadow"
tabindex="0"
Copy link
Contributor

Choose a reason for hiding this comment

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

if the focus is in the formula assistant and the we press arrows/a random key, the assistant gets a black outline. I'm guessing this isn't intended ?

<div class="o-formula-assistant-container user-select-none shadow">
<div
class="o-formula-assistant-container shadow"
tabindex="0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Also pressing tab when the assistant is focused:

  • on the grid composer puts the focus on the grid scrollbar(?), then back on the composer
  • on the topbar composer it puts the focus on the "add rows footer", breaking the display
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess blocking every keyboard input would do the trick :p I guess we would only miss the "Ctrl.A" feature ( and I really don't see the point of doing this tbh)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

honestly, all this is related to the onblur event taht we want to block no matter what. If we disable it on the grid /topbar composer (which I think we should do anyway), it fixes the issue. Did the onblur was absolutely required outside of the standalone composer? I don't recall that well

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the onBlur give the composers a better behavior (no random focus regain after clicking in the topbar), but it's not 100% mandatory. But in 6 month we'll get a new task "cannot select text in the formula assistant in side panel composer" so I'm not sure it fixes the issue 😛

Copy link
Collaborator Author

@rrahir rrahir Nov 13, 2025

Choose a reason for hiding this comment

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

the issue I see with the onBlur is that is some real world cases, like switching tabs to copy/paste a content, you automatically lose the focus, which closes the composer. I stumbled upon it a few times and it wasa bit frustrating. And I obviously won't mention the debug behaviour. I will work around it for this task ofc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

on the topbar composer it puts the focus on the "add rows footer", breaking the

that is also true for other inputs (zoom %, fontsize in the toolbar, I will create another task to address it)

Copy link
Contributor

Choose a reason for hiding this comment

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

I have no strong feeling on onBlur in the grid/topbar composer either way, if you can convince francois i'm fine with removing it 🤷

t-on-pointerdown.prevent.stop=""
t-on-pointerup.prevent.stop=""
t-on-click.prevent.stop="">
t-on-pointerdown.stop=""
Copy link
Contributor

Choose a reason for hiding this comment

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

In the topbar composer, writing =S and clicking on a formula proposition closes the composer

@rrahir rrahir force-pushed the master-select-text-in-assistant-rar branch 2 times, most recently from b0cdbcf to 7c3a015 Compare November 14, 2025 15:49
This commit introduces the possibility for the user to select the text
content of the formula assistant.

Task: 5169514
@rrahir rrahir force-pushed the master-select-text-in-assistant-rar branch from 7c3a015 to 71997cc Compare November 14, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants