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

Extending table capabilities #3594

Closed
2 tasks done
bq-wrongway opened this issue Jan 22, 2023 · 4 comments
Closed
2 tasks done

Extending table capabilities #3594

bq-wrongway opened this issue Jan 22, 2023 · 4 comments
Assignees

Comments

@bq-wrongway
Copy link

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

Its more of a suggestion, #1658 here is a request for table headers, i want to expand on this.

Is it possible to construct a solution with the existing API?

no

Describe the solution you'd like to see.

At the moment table has very basic functionality, extending this would make table widget much more usable and enjoyable.
In the issue that i linked there is request for the headers, i will expand on this a bit :

  1. Columns should be able to be pinned

2)Rows should be able to be pined
(pinning a row, makes further scrolling down the table possible, while not losing the focus of current row ) same for column
especially usefull when there are a lot of rows/columns and we must scroll

3)Rows should be able to be marked somehow (different color, it would make searching and comparing data easier,)
(example, all rows containing X value in column Y should be red)

4)Sorting of the table out of the box

5)Clicking on cell in a row should Highlight whole row, this makes following the row with your eyes much easier, and less error prone,

6)Pagination (scrolling table is great, but with larger amount of data pagination is much more useful)

@andydotxyz
Copy link
Member

andydotxyz commented Jan 22, 2023

Thanks for the feedback / suggestions - but can you please try and keep it to 1 request per ticket? It is difficult to add different resolutions to a single issue.

With regards to the items suggested I think it is important to outline that a toolkit like Fyne is not going to implement all the features of a widget - we want to make sure that we enable everything that you want, but may not actually deliver every feature as a core part of the toolkit. On specifics of your requests above this means:

3: marking items in a column somehow is entirely possible and can be done in your code - you control what is shown in each cell.
4: Table is a collection widget that asks the developer to manage data, therefore we cannot sort out of the box as we have no idea what data you are managing. This is also already possible in your own code.
6: Pagination is not part of a table widget. You can paginate any data and then refresh the widget to show a different window on your data. There may be space for a feature request for a standard pagination control that could be used in conjunction with table, but it does not make sense as a feature of Table itself.

This leaves us with 1, 2 and 5.
Request 1 and 2 both refer to "pinning" - which as I understand it is a feature of headers... I don't think it makes sense to force any other row or column to remain visible as you scroll - so it would be implemented along with the header feature request that you linked to.
5) highlight a row/column when clicking a cell. I can see this being good standard behaviour for a header - but not for any "standard" cell. If you feel differently for the use-case of your app then you can add that behaviour by hooking into the OnSelected callback and adding some "other item is selected" indicator in your table content widgets.

I hope that this response is helpful. Having gone through the items you listed I am not sure what remains as a feature request for the core Table widget separate to the header feature request that already existed.

@andydotxyz andydotxyz self-assigned this Mar 22, 2023
@andydotxyz
Copy link
Member

I should have a PR for the items 1 and 2 at least pretty soon

@andydotxyz andydotxyz added this to the Dalwhinnie (May/June 2023) milestone Mar 22, 2023
andydotxyz pushed a commit to andydotxyz/fyne that referenced this issue Mar 28, 2023
This adds a row and column headers with a sensible default look.
The header widget can be overridden using  and  matching the cell semantics.

See fyne-io#1658, fyne-io#3594
@andydotxyz
Copy link
Member

Option 5 has not been included as the default headers are not buttons.
The code of an app could implement it through a button header and iterating on data to select

@andydotxyz
Copy link
Member

Closing as completed - the remaining items won't be covered as discussed above

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

No branches or pull requests

2 participants