wfp / ui-reactjs

MIT License
4 stars 2 forks source link

Having a list of recommended components #1

Open Utzel-Butzel opened 7 years ago

Utzel-Butzel commented 7 years ago

We just had a call with Laura and Maurizio, and our idea was to have list of reusable packages, where we only provide the related css.

My recommendation for these components would be:

Shall we have some prefered libraries for common components like tooltips, tables, etc.?

laurasilvani commented 7 years ago

Thanks Robert for sharing this list. The goal is to have a set of libraries that should be used in our React apps whenever needed and they should be preferred over other libraries. When using some other libraries, for some other reasons, we must align their styling to our look and feel to ensure visual consistency. I am adding to the list:

laurasilvani commented 6 years ago

Regarding React Table library, the styling of the table itself is a piece of cake, while the pagination has to be rewritten with a custom component to be in line with the UI Kit look & file.

redmoonlas commented 6 years ago

Ok, but if we have a backend pagination management (and it always should be for performance reasons on a big items list) we will handle it with a separate component and leave to the table component only the responsibility of render a single page of items.

Utzel-Butzel commented 6 years ago

@laurasilvani I have a datatable.scss, which is based on the standard react-table styling to adapt the WFP UI Kit look and feel. @redmoonlas Yes, using server side data pagination management with react-table works nicely. https://react-table.js.org/#/story/server-side-data

laurasilvani commented 6 years ago

@Utzel-Butzel That is great, but the React Table pagination is missing the page counting, as it is in the kit http://cdn.wfp.org/guides/ui/v0.14.0/components/navigation/#pagination. As far as I know there are no options available right now other than making our custom component. The Next and Previous buttons are easily customisable.

princylunawat commented 6 years ago

@Utzel-Butzel i have already used the datatable.scss in the current library. i am still missing the column-width adjustment when putting the table in an outer container. You can see it deployed as-is on http://pydev.wfp.org:8311/. Any suggestions on how to fix?

I suggest we make further changes to datatable.scss to meet any remaining guidelines and including the pagination component as well.

laurasilvani commented 6 years ago

UI Elements & Projects.xlsx Here is a list of React elements used by the three React projects in WFP right now, recently updated.