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] web_editor: select cells rectangulary on shift + arrowKey #147880

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

adsa-odoo
Copy link
Contributor

@adsa-odoo adsa-odoo commented Jan 3, 2024

Current behaviour before PR:

  • In table, when trying to select cells using shift + any arrow key, cells are
    selected irregularly and not rectangularly.

Desired behaviour after PR:

  • This PR aims to improve the behaviour of cell selection
    through keyboad in more convenient (symmetrical) way.

  • When there is one or more cells are selected, pressing
    shift + any arrow key expends or shrinks cell-selection
    rectangularly relative to the arrow key directions.

  • It also improves the behaviour of selecting and deselecting
    multiple tables.

task-3442805


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo
Copy link
Contributor

robodoo commented Jan 3, 2024

@C3POdoo C3POdoo added the RD research & development, internal work label Jan 3, 2024
@adsa-odoo adsa-odoo force-pushed the master-table-selection-imp-adsa branch from c34d6dc to 86861cf Compare January 11, 2024 07:18
@adsa-odoo
Copy link
Contributor Author

@shsa-odoo Done required changes!

@adsa-odoo adsa-odoo marked this pull request as ready for review January 30, 2024 09:04
@C3POdoo C3POdoo requested a review from a team January 30, 2024 09:06
@adsa-odoo adsa-odoo force-pushed the master-table-selection-imp-adsa branch 2 times, most recently from e63e786 to 4d790b2 Compare February 6, 2024 10:29
@adsa-odoo adsa-odoo force-pushed the master-table-selection-imp-adsa branch 2 times, most recently from 375dfb0 to 5d39025 Compare March 11, 2024 09:21
@adsa-odoo adsa-odoo force-pushed the master-table-selection-imp-adsa branch 2 times, most recently from c1b29fd to 44f1b46 Compare March 22, 2024 12:03
@adsa-odoo adsa-odoo force-pushed the master-table-selection-imp-adsa branch 3 times, most recently from 486b827 to e96c3b9 Compare April 2, 2024 07:09
@adsa-odoo adsa-odoo force-pushed the master-table-selection-imp-adsa branch from e96c3b9 to 8109e7d Compare April 9, 2024 11:48
@adsa-odoo adsa-odoo force-pushed the master-table-selection-imp-adsa branch from 8109e7d to 1898225 Compare May 1, 2024 07:13
@adsa-odoo adsa-odoo force-pushed the master-table-selection-imp-adsa branch from 1898225 to 40f3b0c Compare May 9, 2024 12:22
@adsa-odoo adsa-odoo force-pushed the master-table-selection-imp-adsa branch 2 times, most recently from 76bda2f to 9998e7b Compare May 14, 2024 07:14
Current behaviour before commit:

In table, when pressing shift + any arrow key, cells are
selected irregularly and not rectangularly.

Desired behaviour after commit:

-This commit improves the behaviour of cell selection
 through keyboad in more convenient (symmetrical) way.

-When there is one or more cells are selected, pressing
 shift + any arrow key expends or shrinks cell-selection
 rectangularly  relative to the arrow key directions.

task-3442805
Current behaviour before commit:

Can't select a single cell using keyboard
when there is selection inside a single cell.

Desired behaviour after commit:

-If there is no content in a cell, pressing
 shift + ArrowKey selects single cell.

-If there is content in a cell, pressing shift +
 ArrowKey selects the content of cell as per
 browser's default behaviour. Once selection is
 at the edge if the content the cell gets selected.

-If there are two selected cells, pressing shift +
 ArrowKey to shrink the selection selects single
 cell.
Current behaviour before commit:

-When there is a text above and below a table and user
 starts selecting the content from the text above the
 table using keyboard, he needs to press shift + ArrowDown
 multiple times to reach the text below table.

-Similar scenario occurs in case of selecting from text
 below to the text above.

-This happens because when selection is inside the table
 as well as outside of it, table gets fully selected through
 customized selection but the actual focusNode is still the
 first cell of the table.

Desired behaviour after commit:

Now when selection enters the table from outside, last cell
of the table cell is set as focusNode (fisrst cell in case
of inverse selection) in order to select the full table.
Due to this, user can select the content after the table
in just one press.

task-3442805
Before this commit When a table is fully selected along with
content outside of it, user needs to hit shift + ArrowKey
multiple times to deselect the table, it gets deselected
at once at the end. This commit ensures that user can deselect
the table in a single try.

task-3442805
@adsa-odoo adsa-odoo force-pushed the master-table-selection-imp-adsa branch from 9998e7b to 6196a50 Compare May 14, 2024 07:22
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.

None yet

5 participants