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

WIP: TS rewrite #203

Merged
merged 11 commits into from
Jun 6, 2023
Merged

WIP: TS rewrite #203

merged 11 commits into from
Jun 6, 2023

Conversation

lilianalillyy
Copy link
Contributor

@lilianalillyy lilianalillyy commented Apr 15, 2023

The work from https://github.com/lilianalillyy/datagrid continues here. Main goal is to fully rewrite the entire library in TypeScript with modularity in mind (treeshaking, etc), while also being extensible - therefore plugins which will fulfill both of these needs.

As of merging the original repository, the base datagrid.js was nearly completely rewritten with few dataGridRegisterExtension's missing and Sortable behavior not yet implemented. Here's the full list of unimplemented functionality:

  • datagrid.js: missing dataGridRegisterExtensions
    • datagrid.url
    • datagrid.sort
    • datagrid.item_detail
    • datagrid.tree
    • datagrid.after_inline_edit
    • datagrid-toggle-inline-add
    • datagrid.inline-editing
    • datagrid.redraw-item (+ redraw implementation)
    • datagrid.reset-filter-by-column
  • Sortable behavior (default impl using sortablejs)
  • Datepicker (default impl using vanilla-datepicker)
  • Selectable (default impl using tom-select)
  • datagrid-spinners, datagrid-instant-url-refresh

@lilianalillyy
Copy link
Contributor Author

Sortable behavior only requires implementing the use of the external library (in this case SortableJS, events are already handled) - this means only the $.sortable class need to be re-implemented.

@lilianalillyy
Copy link
Contributor Author

note: datagrid/next templates/datagrid_tree has a typo {btnSecondaryClass} (-> {$btnSecondaryClass})

@lilianalillyy
Copy link
Contributor Author

(also, either my assets are not being built properly or the BS5 support is very WIP)

@lilianalillyy
Copy link
Contributor Author

lilianalillyy commented Apr 17, 2023

As far as I can see from the demo, the only things that are not working at the moment:

  • Autosubmit of selects
  • Datepicker
  • Page fully refreshes on URL change (instead of just changing the URL)
    • Full page reload bug prevents Inline Edit from functioning (blocking redirect via window.onbeforeunload shows that it's otherwise working)
  • Sortable (as it's not implemented yet)
  • Bootstrap dropdowns (possibly fault of Bootstrap dropdown js?) - therefore all dropdown-related functions are not yet checked (indeed fixed by initializing the Dropdown component from bootstrap's js)
  • Group actions "choose" disabled state not changing on (de)select of items select all
  • Item Detail Slide animation of Item Detail ($.slideToggle)
  • TreeView
  • Position of bootstrap dropdowns (placement.split() is not a function floating-ui/floating-ui#1768)

The following is everything I've come across comparing my local vs. prod (https://examples.contributte.org/datagrid-skeleton). Not counting with styles as those are WIP (#168).

@f3l1x f3l1x marked this pull request as ready for review June 6, 2023 19:19
@f3l1x f3l1x merged commit 0b2946c into contributte:next Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants