okfn / opendataeditor

The Open Data Editor (ODE) is a no-code application to explore, validate and publish data in a simple way. Forever free and open source project powered by the Frictionless Framework.
http://opendataeditor.okfn.org
MIT License
183 stars 23 forks source link

Tables - Filter options (Research) #415

Closed romicolman closed 4 months ago

romicolman commented 5 months ago

Problem description

Right now, if a user wants to filter tables on the ODE, they have to go to click on the Captura de pantalla 2024-05-30 a la(s) 10 38 28 a  m next to the name of the column. This options will be displayed:

Captura de pantalla 2024-05-30 a la(s) 10 36 28 a  m

Full list of options:

I created a separate issue (#411) for the lock function.

Questions (for investigation)

guergana commented 5 months ago

Hello @romicolman.

Replying to your questions:

is this that the full list of available options?

Answer: According to the docs these are the full options available in the menu natively, like these are the default, some others can be added but the functionality for those we have to implement ourselves (see the answer to the last question):

    sort asc/desc
    show/hide column
    group/ungroup by column
    lock/unlock column
    disable/enable filtering

This type of menu that appears with a right-click is called Context Menu. You can see where this info is provided in the official docs of the reactDataGrid plugin.

- What does the group/ungroup functions do? I tried different things and they didn't manage to get them activated.

Answer: Here you can find a live example of what the group function does, this feature is only activated it seems if you have the enterprise edition, so it's good that we already removed it in #411.

For the Columns function. Would it be possible to add a "Select all" to select and unselect all columns?

Answer: I think it is possible yes, here you have the implementation of a selectAll with a working example, though I think this selects all the records and not only the ones visible on the page, since we have pagination. And there is also the chance to add new elements to the Context Menu, with the renderColumnContextMenu prop. You can see a working example here.

guergana commented 5 months ago

@romicolman this is ready for review.

romicolman commented 5 months ago

Hi, @guergana thanks for this incredible and detailed explanation :) Answers and comments below. I'll create a separate issue for further changes.

Is that the full list of available options?

What do the group/ungroup functions do? I tried different things and they didn't manage to get them activated.

Perfect! It was a good decision to remove the GROUP/UNGROUP.

For the Columns function. Would it be possible to add a "Select all" to select and unselect all columns?

The main question here is how much time would it take us to add a "SELECT ALL" within the Columns feature on the filtering option for columns. Do you think it will require a lot of technical effort?

Just in case, I'm referring to this part:

Image

Apart from the components addressed in this issue, I think it is possible (from what I have seen) to reorder options in the column menu, right? If that is option (can you confirm?), I will also file another ticket to request changes, but I'll check this with Faith, first.

I also noticed that the Autosize options are not working. We will handle this in a new ticket, too.

guergana commented 5 months ago

Hi, @romicolman :) adding the select all would be like a 2 effort.. i am just wondering how to go about the pagination.. if it would select only the current page or all the data of the table.

romicolman commented 5 months ago

Maybe I'm understanding this in the wrong way, but what I mean is the possibility of selecting/unselecting columns. Right now the one by one option is working and the ODE shows it correctly. Do you want to check this during the stand-up call today?

guergana commented 5 months ago

Maybe I'm understanding this in the wrong way, but what I mean is the possibility of selecting/unselecting columns. Right now the one by one option is working and the ODE shows it correctly. Do you want to check this during the stand-up call today?

Yes, but if you select all the columns, that means you are selecting all the content, right?

romicolman commented 4 months ago

Sorry for the delay. I have just noticed I did not reply to this comment.

Pagination is affected by the select all/unselect columns? Let's discuss this in a short call. Since this is a research ticket, I'm creating a new one to apply changes.