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

[gv-table] Refactoring of gv-table component #247

Open
aelamrani opened this issue Jan 19, 2021 · 1 comment
Open

[gv-table] Refactoring of gv-table component #247

aelamrani opened this issue Jan 19, 2021 · 1 comment

Comments

@aelamrani
Copy link
Member

aelamrani commented Jan 19, 2021

Context

Currently, the gv-table is configuration-based, this is very useful when working with a dataset with only a few basic columns but becomes a real pain with complex rows.

Goal

The goal of this issue is to rework the gv-table to provide a better Developer eXperience. A way to do that can be to use slot to define rows, allowing users to write them in plain HTML file instead of using a config attribute like today. However this is not a silver bullet and leads to questions we need to keep in mind when working on that:

  • Should the slot only give a kind of template and the data should still be passed to the gv-table to let it populate the template?
  • Or, should the slots be used for the header and all the rows; meaning the gv-table is only handling some styling?
  • What about the pagination? Should it be integrated or let to the user? Should the potential "pagination API" be designed with server or local pagination in mind?
  • What about the alpha sort per column? If the gv-table doesn't contain the data anymore it can not sort them directly

Also, this component is quite used in the Gravitee.io ecosystem so we need to minimise the breaking change or start a fresh component to enable users to gradually migrate.

As of today, the Portal is using 13 gv-table, it could be a good start to take a look at them and use one as a real use case when developing the new version. It would help to:

  • Focus on the must-have feature
  • Be sure the DX is improve
  • Have a migration example to share with devs

Additional info / Comments

For any details discuss with @gcusnieux @gaetanmaisse

Related issues:

@gaetanmaisse gaetanmaisse changed the title Refactoring of gv-table component [gv-table] Refactoring of gv-table component Apr 28, 2021
@gaetanmaisse
Copy link
Contributor

gaetanmaisse commented May 17, 2021

After a few investigations, I confirm handling all the features and use-cases we have in mind will come with a pretty high cost.

Pragmatically, I think we should reorient this issue to find an external library we can use in our Angular apps. Then we can do some custom CSS/SASS to get the style we want (and expose it as part of this package) and write some documentation to advocate its usage in Gravitee.io ecosystem.

Here is a few potential candidates:

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

No branches or pull requests

2 participants