* Render add new link, only render delete on isnew is false * Add header actions buttons based on state * Add header buttons and breadcrumbs * Style tweaks * Add navigation guard for single collections * Add delete button logic * Add ability to delete items on browse * Add select mode to tabular layout * Add saving / deleting logic to detail view * remove tests (temporarily) * Remove empty tests temporarily * Add pagination to tabular layout if collection is large * Add server sort * wip table tweaks * show shadow only on scroll, fix padding on top of private view. * Update table * fix header hiding the scrollbar * Fix rAF leak * Make pagination sticky * fix double scroll bug * add selfScroll prop to private view * Last try * Lower the default limit * Fix tests for table / private / public view * finish header * remove unnessesary code * Fix debug overflow + icon alignment * Fix breadcrumbs * Fix item fetching * browse view now collapses on scroll * Add drawer-button component * Fix styling of drawer-button drawer-detail * Revert "browse view now collapses on scroll" This reverts commit a8534484d496deef01e399574126f7ba877e098c. * Final commit for the night * Add scroll solution for header overflow * Render table header over shadow * Add useScrollDistance compositoin * Add readme for scroll distance * Restructure header bar using sticky + margin / add shadow * Tweak box shadow to not show up at top on scroll up * Fix tests Co-authored-by: Nitwel <nitwel@arcor.de>
app-next
Status: pre-alpha
We're aiming to have the app codebase converted to TypeScript and fully unit test covered. This repo serves as a way for us to work on the bigger more foundational parts of the app codebase, without interferance of the legacy parts.
New components introduced in this repo will land in the current codebase where applicable. Bugfixes will continue to happen on the current codebase, until this version is fully done and merged.
This version is in no way shape or form intended to be used in production environments.
Once this codebase is complete enough to be used as main front-end, it will be moved to a branch on the main directus/app repo at which point it will be released as an beta / RC until confirmed ready.
Goals
- Have everything in TypeScript
- Have full test coverage
- Have as much of the components in Storybook as possible
- Rely on global state the least amount possible
Contributing
If you want to help out in the new version, please open an issue to discuss what you would like to do before opening a pull request. This makes sure we don't do overlapping work or work on something that's not intended to be in the app.
Development
You need Node.js v10+ and Yarn.
After cloning the repo, run:
$ yarn # install all dependencies of the project
Scripts
yarn serve
Bundles the app in dev mode and watches for changes.
Combine this with the API_URL environment variable to point it to a running API instance to debug fully:
$ API_URL=https://local.api.com yarn serve
yarn storybook
Fires up an instance of Storybook and watches for changes. Very useful to develop individual components in isolation.
yarn test
Runs all Jest tests in the app. Add the --coverage flag to see a print of what test coverage you've achieved.
Please aim for 100% coverage for newly added code.