Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26516

As an editor, I want to be able to add/edit tabular data in RichText editor

    Details

      Description

      Tables are partly supported and can arrive in OE via cut and paste and via upgrade. Tables are needed when you present tabular data so should be added for that.

      So technically this story is about first and foremost just exposing the builtin table support in Alloy, and adapt our embed logic to make sure it can not be added to table as it breaks down (future editor milestone work will be needed on that)

      Disclaimer: eZ does not think tables are good for layout, plenty of users tend to use it for that to, so future feature is to be expected on that, which may or may not align with layout concepts in landing pages and other layout solutions.

        Activity

        Hide
        Rui Silva (Inactive) added a comment -

        Qa tests on this run only take into account using regular text for the table cells, and does not encompass edition of the table, which, after the discussions herein, seems to be the final scope of this jira.
        Tested and approved by QA for master.

        Show
        Rui Silva (Inactive) added a comment - Qa tests on this run only take into account using regular text for the table cells, and does not encompass edition of the table, which, after the discussions herein, seems to be the final scope of this jira. Tested and approved by QA for master.
        Show
        André Rømcke added a comment - Merged: https://github.com/ezsystems/PlatformUIBundle/commit/27faf862d98f3f655dde615b3c95eee372c89cf0
        Show
        André Rømcke added a comment - Ready for first QA round: https://github.com/ezsystems/PlatformUIBundle/pull/772#discussion_r121376606
        Hide
        Roland Benedetti added a comment -

        Sorry André,
        Yes I agree we can do this.
        But also, regarding my proposal, is there a simple way to just deactivate the action showing on the table element?
        Then I think it would be usable, simply the table could not be edited or moved.
        If this is any complex, we should not do it and just go for your #1 suggestion, but I thought it was a potential solution.

        Show
        Roland Benedetti added a comment - Sorry André, Yes I agree we can do this. But also, regarding my proposal, is there a simple way to just deactivate the action showing on the table element? Then I think it would be usable, simply the table could not be edited or moved. If this is any complex, we should not do it and just go for your #1 suggestion, but I thought it was a potential solution.
        Hide
        André Rømcke added a comment - - edited

        1. Agree we should probably move story to a later epic, unless we add it as-is under a feature / config flag for now for those that want it badly and with inline warning that it can only be used for text content at the moment. WDYT Roland Benedetti?

        2. A solution to the block problems here should be aligned with upstream. And while I was about to argue we should propose a logic to them [~damien.pobel@ez.no] talked about a few weeks ago, namely change inline menu to generate buttons from current tag up to root block element, with maybe a separator or some other way to signify what block / inline element button groups are for. A look at their demo seems to indicate they don't have this problem as inline menu will vary on what you select, see attached "alloy-" images. Can't we apply the same logic and align?

        Show
        André Rømcke added a comment - - edited 1. Agree we should probably move story to a later epic, unless we add it as-is under a feature / config flag for now for those that want it badly and with inline warning that it can only be used for text content at the moment. WDYT Roland Benedetti ? 2. A solution to the block problems here should be aligned with upstream. And while I was about to argue we should propose a logic to them [~damien.pobel@ez.no] talked about a few weeks ago, namely change inline menu to generate buttons from current tag up to root block element, with maybe a separator or some other way to signify what block / inline element button groups are for. A look at their demo seems to indicate they don't have this problem as inline menu will vary on what you select, see attached "alloy-" images. Can't we apply the same logic and align?
        Hide
        Roland Benedetti added a comment -

        About this discussion,

        First I'd say we should for the time being keep it simple to complete M3:
        No editing of the table in the OE. The workaround is then to paste a table structure in the editor and use it.
        No way to create tables, add row, remove row etc...

        The question about the up/down is still open but I believe it should move the element up to the previous cell, if last cell, take it out of the table.

        For the future, something like what you suggest, with a button to toggle table settings could work.
        Other option could be to do something not inline (but a button that would toggle a table editor in modal/overlay), note that I think it would be great to also be able to control responsive grids ala bootstrap.

        Show
        Roland Benedetti added a comment - About this discussion, First I'd say we should for the time being keep it simple to complete M3: No editing of the table in the OE. The workaround is then to paste a table structure in the editor and use it. No way to create tables, add row, remove row etc... The question about the up/down is still open but I believe it should move the element up to the previous cell, if last cell, take it out of the table. For the future, something like what you suggest, with a button to toggle table settings could work. Other option could be to do something not inline (but a button that would toggle a table editor in modal/overlay), note that I think it would be great to also be able to control responsive grids ala bootstrap.
        Hide
        Damien Pobel (Inactive) added a comment - - edited

        actually, I've just realized this brings another issue because the table toolbar has 2 kinds of button. The move up/down and remove acts on the table so for those, this will work but the others buttons offer to act on the column, the row or the cell where the user put his pointer. And of course, if you give the focus to the full table, the later type of buttons is irrelevant since no cell is focused.

        Show
        Damien Pobel (Inactive) added a comment - - edited actually, I've just realized this brings another issue because the table toolbar has 2 kinds of button. The move up/down and remove acts on the table so for those, this will work but the others buttons offer to act on the column, the row or the cell where the user put his pointer. And of course, if you give the focus to the full table, the later type of buttons is irrelevant since no cell is focused.
        Hide
        Damien Pobel (Inactive) added a comment - - edited

        Roland Benedetti  Supriya Bhargava Inaki Juaniz-Velilla

        André Rømcke's pull request raises several questions on how the table should be handled in Online Editor.

        At the moment, it's possible to have something like the table_vs_embed_vs_other_content.png screenshot where there are at least 2 issues:

        1. if you add an embed or an image in a table, there's no way to do anything on it (not even remove it) because if you click on it you still see the table toolbar not the embed/image one. We might display the toolbar of the clicked element (so in the screenshot the embed one) but then in that case, we would loose the toolbar for the table without any way for the user to get the table toolbar since there's no way to click on the table alone
        2. for the same reason, in the screenshot situation, it's impossible to add anything after the table. If you click in the table, you give the focus to the element inside the table so when you use the toolbar, any element you add will be added in the table after the element you clicked.

        One option to solve those issues would be to allow the user to click on the table with "something". For instance, in the element_focus_table.png screen I added a "Table settings" element on top of the table. So with such thing in the place, the user would be able to click on "Table settings" to get the table toolbar to handle it and any click in the table would give the focus to the element in the table the corresponding toolbar would be displayed.

        Any opinion on that ?

        Show
        Damien Pobel (Inactive) added a comment - - edited Roland Benedetti   Supriya Bhargava Inaki Juaniz-Velilla André Rømcke 's pull request raises several questions on how the table should be handled in Online Editor. At the moment, it's possible to have something like the table_vs_embed_vs_other_content.png screenshot where there are at least 2 issues: if you add an embed or an image in a table, there's no way to do anything on it (not even remove it) because if you click on it you still see the table toolbar not the embed/image one. We might display the toolbar of the clicked element (so in the screenshot the embed one) but then in that case, we would loose the toolbar for the table without any way for the user to get the table toolbar since there's no way to click on the table alone for the same reason, in the screenshot situation, it's impossible to add anything after the table. If you click in the table, you give the focus to the element inside the table so when you use the toolbar, any element you add will be added in the table after the element you clicked. One option to solve those issues would be to allow the user to click on the table with "something". For instance, in the element_focus_table.png screen I added a "Table settings" element on top of the table. So with such thing in the place, the user would be able to click on "Table settings" to get the table toolbar to handle it and any click in the table would give the focus to the element in the table the corresponding toolbar would be displayed. Any opinion on that ?
        Show
        André Rømcke added a comment - PR: https://github.com/ezsystems/PlatformUIBundle/pull/772

          People

          • Assignee:
            Unassigned
            Reporter:
            André Rømcke
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: