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

EZP-31632: Floating table toolbar #148

Merged

Conversation

SerheyDolgushev
Copy link
Contributor

@SerheyDolgushev SerheyDolgushev commented May 15, 2020

Question Answer
JIRA issue EZP-31632
Bug/Improvement yes
New feature no
Target version master
BC breaks no
Tests pass yes
Doc needed no

Right now table toolbar has fixed positioning, and in some cases it brings inconvenience.

Steps to reproduce:

  1. Open any content with RichtText field for editing
  2. Insert a big table (50 rows) into RichText field
  3. Scroll to the last table row and try to insert a new row after it

Expected result
The table toolbar should be shown on the screen, and new row should be inserted without any scrolling.

Actual result
The table toolbar remains at the start of the table. And the editor needs to scroll to it, to add a new row.

TODO:

  • Implement feature / fix a bug.
  • Implement tests.
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@dew326 dew326 requested review from dew326, GrabowskiM and lucasOsti May 15, 2020 11:34
@dew326
Copy link
Member

dew326 commented May 15, 2020

I think this bug is also in the 2.5 LTS. Please create this fix in ezplatform-admin-ui to branch 1.5 or if you feel it more like improvement please change the base branch to master here because it's questionable if it is bug or improvement.

@SerheyDolgushev SerheyDolgushev changed the base branch from 2.0 to master May 18, 2020 12:15
@SerheyDolgushev
Copy link
Contributor Author

@dew326 Changed base branch to master, as personally I think it is not a bugfix, but an improvement.


export default class EzConfigTableBase extends EzConfigButtonsBase {
export default class EzConfigTableBase extends EzConfigBase {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure but EzConfigFixedBase could be better because as I understand this fix will work for td and it's at the top of the td. When user will use elements path and will select table there will be the same problem. With EzConfigFixedBase it will be fixed at the top o the screen if it should be outside.

Also, the second question is do we want to cover the table with toolbar (I know there was some clients that don't like when toolbar is covering what they wrote in previous line), but this is a question to @SylvainGuittard.

Choose a reason for hiding this comment

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

I just tried the steps to reproduce and I understand the pain point here.
I think it makes sense for the table toolbar to be visible by the user.

Copy link

@inakijv inakijv May 18, 2020

Choose a reason for hiding this comment

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

Hi guys, adding the UX perspective here.
I would go for a similar solution that the RTE Paragraph toolbar has right now, given this behavior was added after being user tested, I agree @dew326.
Maybe a potential option to make this work better would be also to remove the fixed position from ez-edit-header__content-type-name.

@neiluJ
Copy link

neiluJ commented Sep 17, 2020

Hello guys, any release date planned for this fix ?

@SerheyDolgushev
Copy link
Contributor Author

Hello guys, any release date planned for this fix ?

@neiluJ meantime you can use https://packagist.org/packages/contextualcode/ezplatform-alloyeditor-table-tools

@dew326
Copy link
Member

dew326 commented Sep 23, 2020

For this to be merged we need:

  1. Rebase with current master
  2. Change the EzConfigBase to EzConfigFixedBase as this behavior is better. (EZP-31632: Floating table toolbar #148 (comment))

@SerheyDolgushev
Copy link
Contributor Author

For this to be merged we need:

  1. Rebase with current master
  2. Change the EzConfigBase to EzConfigFixedBase as this behavior is better. (#148 (comment))
  1. Latest master is merged
  2. Done: 402bc7a

@dew326
Copy link
Member

dew326 commented Sep 24, 2020

Could you also explain this commit? cff502a
Seems like it fixing some bug, which is not only in master?

@SerheyDolgushev
Copy link
Contributor Author

@dew326
Sorry, I`m not sure why cff502a is a part of this PR, as it is related to #149. Most likely I realized it after #149 was merged, but still I do not remember why this commit was pushed to this PR. Also, I just pushed b676083. Which is directly related to #163.

Should both of those commits be removed from this PR? And should we create a separate PR for each of them?

Also please note 43f5ad8. And the reason for this, is that when EzConfigFixedBase is used the toolbar is shown at the top of the table. But when EzConfigBase is used the toolbar is shown at the active table row. And that is the main purpose of this PR.

@SerheyDolgushev
Copy link
Contributor Author

Sorry, but right now I have a feeling like cff502a and b676083 are making all the things much more complicated and they should be removed from this PR. A separate PR will be submitted for them. I'm not going to remove them from this PR, but will just revert, to make sure their links will remain in the PR conversation messages.

@SerheyDolgushev SerheyDolgushev mentioned this pull request Sep 29, 2020
4 tasks
@SerheyDolgushev
Copy link
Contributor Author

#165 was submitted, and it is absolutely unrelated to this PR.

@dew326
Copy link
Member

dew326 commented Sep 30, 2020

Also please note 43f5ad8. And the reason for this, is that when EzConfigFixedBase is used the toolbar is shown at the top of the table. But when EzConfigBase is used the toolbar is shown at the active table row. And that is the main purpose of this PR.

We had complaints about that the toolbar covers the previous text and this was the reason why we introduced this fixed toolbar. Yes, it will go to the top of a table but when the top of the table is outside of the screen it will be fixed to the top of the window.

@SerheyDolgushev
Copy link
Contributor Author

@dew326 Sorry, but I just did another test using EzConfigFixedBase using the case from this PR description. And the toolbar wasn't shown at all when "the top of the table is outside of the screen":

table-floating-toolbar

In that case, maybe something needs to be fixed in EzConfigFixedBase?

@dew326
Copy link
Member

dew326 commented Oct 1, 2020

It works for me:
Zrzut ekranu 2020-10-1 o 07 36 53

You have some fixed bar at the top, which I don't recall if we have something like this in our product. Maybe this bar is covering the alloyEditor toolbar?

@SerheyDolgushev
Copy link
Contributor Author

@dew326 EzConfigFixedBase was not working for me because of missing ae-toolbar-floating CSS class.

So EzConfigFixedBase was enabled: c1fd697. And missing ae-toolbar-floating CSS was fixed: 2e6acfe.

Also I was checking this PR on 3.1.3 and found out that the toolbar is covered by "edit header", which seems to be not a case for latest master because of the new UI changes. It is fixed in 16d73b0.

table-toolbar

@SerheyDolgushev SerheyDolgushev requested a review from dew326 October 6, 2020 12:40
@SylvainGuittard
Copy link

Thanks @SerheyDolgushev for your contribution.

I think this bug is also in the 2.5 LTS. Please create this fix in ezplatform-admin-ui to branch 1.5 or if you feel it more like improvement please change the base branch to master here because it's questionable if it is bug or improvement.

Sorry, I am late in the game. I agree with Darek. I consider this as a bug. IMHO, this fix should also go to 2.5LTS
Can we merge and backport or should we rebase again 1.5?

@dew326
Copy link
Member

dew326 commented Oct 8, 2020

In 2.5LTS we had AlloyEditor in the admin-ui bundle so another PR should be opened in this repo against branch 1.5.
This PR should be rebased with the latest supported branch so with 2.1.

@SerheyDolgushev SerheyDolgushev changed the base branch from master to 2.1 October 9, 2020 12:35
@SerheyDolgushev SerheyDolgushev force-pushed the fixed-table-toolbar-positioning branch from 9147515 to 05df450 Compare October 9, 2020 12:35
@SerheyDolgushev
Copy link
Contributor Author

@dew326 this PR is based on 2.1 now, and the "Edit header" offset was enabled. Please let me know if any changes are required here.

@dew326
Copy link
Member

dew326 commented Oct 9, 2020

No, this PR is good.

@dew326
Copy link
Member

dew326 commented Oct 12, 2020

I will pass this PR to the QA.

@SerheyDolgushev Could you prepare the same fix for 2.5 (in admin-ui bundle)?

@dew326
Copy link
Member

dew326 commented Oct 12, 2020

Note for QA:
This PR should also fix customer request in 3.1 https://jira.ez.no/browse/EZP-32006

Copy link

@katarzynazawada katarzynazawada left a comment

Choose a reason for hiding this comment

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

Toolbar is shown when scrolling but it skips for a while when selecting another cell in the table. See please: http://g.recordit.co/CxmDj9xf75.gif

@SerheyDolgushev
Copy link
Contributor Author

Sorry, but it seems like the lag is caused by the huge size of the test table. And it seems like that lag is not related to this PR. @dew326 have you had any chance to look into this? Maybe there should be a separate PR/issue for toolbar rendering performance on huge tables like the one from the last QA?

@micszo micszo assigned micszo and unassigned katarzynazawada Dec 1, 2020
Copy link
Member

@micszo micszo left a comment

Choose a reason for hiding this comment

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

Hi @SerheyDolgushev
I tested these changes on v3.1.4.

Even with a small table (5x5) the issue exists.

Actual: Toolbar is first aligned to the table cell then, after a while, toolbar is aligned to the table (to the left)
Expected: Toolbar is aligned to the table (to the left, as for a long portion of text) from the beginning.

Regarding the bug https://issues.ibexa.co/browse/EZP-32006 we might need to deal with it separately. \cc @barw4

@SerheyDolgushev
Copy link
Contributor Author

Hello @micszo

Could you please test it now?

@micszo
Copy link
Member

micszo commented Dec 3, 2020

Hi @SerheyDolgushev

the sticky toolbar works fine now for long portions of text and large tables.

However the pop-up with settings for custom tags (youtube, facebook, twitter) is broken now.
Please see the recording: https://recordit.co/7cLmNWL37l (the complete animation didn't get recorded)

Steps:

  1. Add e.g. youtube custom tag.
  2. Fill URL.
  3. Save
  4. Try to open custom tag settings with edit pencil.

Actual result: The pop-up jumps out of the visible area.
Expected result: The pop-up is displayed above the custom tag.

@SerheyDolgushev
Copy link
Contributor Author

SerheyDolgushev commented Dec 3, 2020

Hello @micszo,
Can you please check all the possible usecases one more time? Also please note, that there are separate issues with the custom tag toolbar, which was fixed in #169.

Copy link
Member

@micszo micszo left a comment

Choose a reason for hiding this comment

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

The changes request in https://issues.ibexa.co/browse/EZP-31632 and https://issues.ibexa.co/browse/EZP-32006 are in place now.

Didn't find new issues with the toolbars this round.

Checked both block and inline custom tags.

Verified on eZ Platform EE v3.1.4 with diff. Also applied the diff for https://issues.ibexa.co/browse/EZP-32187.

@micszo micszo removed their assignment Dec 4, 2020
@lserwatka lserwatka merged commit 5b7cc89 into ezsystems:2.1 Dec 7, 2020
@lserwatka
Copy link
Member

@dew326 could you merge it up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

10 participants