Commit Graph

51 Commits

Author SHA1 Message Date
jasquat 898015ce3c
Spiffui/newui (#1891)
* Scaffold new UI homepage, hide current nav bar

* Layout set up

Divider was fiddly, but got the same setup as Figma now.

* Config to allow svg loading and imports etc. in Vite

Also moved preact from dev deps to deps (recommended).

* Configure app to use Poppins

Was a little tricky, had to isolate this from the rest of the app.

* Move icons from figma to app, set up menus

SVGs have to be exported from Figma, moved into assets in app, etc.

* Layout and SideMenu

Components and layout all set.

* Some basic global themeing knocked off from Web3

* Datagrid Layout complete

Nothing works and the data is contrived, but it's all matchy-matchy with the Figma view and so on.

* Menu items hover and rollover states

* Add card row

* useProcessInstances hook

Knocked off from the call logic in ProcessInstanceListTable

* Responsiveness

* Responsive tweaks

* Live data in grid etc.

* Phone responsive

* Responsivness working across all breakpoints

* Side menu height simplification

* more chips for milestone and status

* Basic client grid search

* Newui README and component notes.

* Add docs, cleanups, etc.

* Component docs

* Theme more robust

Also added framework for dark mode.

* Dark mode and theme enhancements

* Install signals integration for vite, cleanup, and working darkmode toggle.

* Update SpiffUIV2.tsx

* Toggle feature for menu items

Includes ability to swap icon and text on a toggle. Useful for dark mode toggle and possibly other things.

* User menu pinned to bottom of VH

Doesn't get lost if datagrid is long.

* Color fixes for dark mode, added in tokens where possible.

* Responsive Side Menu

* adjusted filter cards to dark mode

* Customize global themes for light and dark success/light/info/warning/error

Pushing use of tokens everywhere, took some wrangling but it's in place now.

Also fixed cards and a few other things to size more cleanly in responsive modes.

* Fix tab light/dark mode swap

Requires a bit more customiization of the theme.

* Slide transition for menu

* Solved very annoying MUI problem

If there is a scrollbar on the screen, opening a Select removes it. This is intentional (use can not scroll the screen while select is open) but it has the unfortunate consequence of removing the browser scrollbar is that it increases the viewport size, causing all responsive layout to shift. This tells it "leave it be".

Also add ability to feed in info to process instance hook.

* Refactor some items to make layouts more declarative.

We want the info window to be in the center-right of the view all the time, with some appropriate padding on the top-bottom, so regardless of the scroll position or window size they never lose it.

Also, responsiveness (will resize until MD breakpoint then hide).

* Refactor Dashboard to switch grids more cleanly

* Info panel wired up

* Task Collection, view hook etc.

* My Tasks search working

* Tab nav set up

* "Old" forms loading into "new" flyout window.

Had to move a few things around and dig into the routes, but got it up and running for demo.

* InfoPanel displays selections from different grid views

Built mini-factory to feed InfoPanel ReactNodes to render using selected grid item data.

* Info panel toolbar, formatting and light/dark settings.

* InfoPanel display with tasks

APIs need to be sorted out, there doesn't appear to be an easy way to get all Tasks for a given ProcessId at this point.

* Format dates in grids

* Wire everything up for working workflow (demo-worthy)

* Toggle for Row click panel open/close

* Completed and waiting tasks in info panel.

* Scrollable grids in the Dashboard view (no more page scrolling)

* Remove mystery zero

Stray truthy test was rendering the result (false, 0)

* Tweak to prevent child scrollbars from overlaying infopanel windows.

* had to install jsdom for Vue testing.

* Update package-lock.json

* Possibly ran npm i in the wrong directory hmm...

* add optional platform dep

* update lock file with optional dep info

* Add ESBuild (this package was not found)

There might be a global install but Vite/npm ain't seein' it.

* Trying to make esbuild optional (it might already be global)

* Accordions for tasks, and create a hook to enable some flexible customization.

* Updates and refactoring to make more (possibly) extension-ready components for the data displays.

* PI times summary report

Also cleaned up some MUI Dom errors/warnings.

* build images for newui

* revert some changes in package-lock that did not help

* Rebuilding repo (had "bad objects" error)

* Charts (mostly for demo)

* Responsive!

* Collapsible side menu

Added a button component suitable for the positioning/display, adjusted responsiveness (when the menu is collapsed, we need the grid to take up more room, and when the menu is naturally collapsed by screen size, we don't want the toggle button, etc.)

* Adjust menu to display abbreviated spiff logo when collapsed.

* Update DashboardCharts.tsx

* Inserted Paper wrapper for sidemenu

Makes the background responsive to dark mode (so it's not just more black surface).

* Update SideMenu.tsx

Fix positioning to accommodate new wrapper padding.

* First wave of theme changes, global font alterations, restructure nav to top

* Moving the design revamp along

Walking the line between the new ideas but using the current functionality and components (we don't have designs for where things lik the dark mode and logout buttons go, the toolbar was removed but now we need a place for the start process button, we still need the tabs, etc.).

* Moving new style along

Had to add custom background palette for dark/light mode.

* Carousel display and task cards for new display

* Grids, carousels, accordions, etc.

All in design requirement Desktop 27 (Figma file)

* All finished

Revamped, workflow implemented, rotating charts, dark mode checked, new scrollbars for more ipad-like feel, search working, etc. etc.

* Tweaks and good to go.

* Update MyProcesses.tsx

Remove console.log.

* Collapse process detail by default, and fix tasks label.

* Full screen containers

We don't want th default max width enforced by MUI.

* TopNav responsiveness and speedial

* Responsive grid areas

* Add task counts

* create a top level route for the new spiff ui from App.tsx w/ burnettk (#1586)

Co-authored-by: jasquat <jasquat@users.noreply.github.com>

* Unused imports

* Clean up wonky pie chart.

* Remove hardcoded url

* Clean up info panel

* Fix menu button responsive text wrap wonk

* Put grid back

With data changes since there is more stuff in the first column (based on the design). I took a best guess.

* Remove cell focus outline with CSS overrides MUI

* Flyout Panel for demo (new look etc.)

* Task switching in panel.

* Cleanup tweaks pre-demo.

There is a bug in the "first select" of a row with tasks, I'm aware of it.

* Rework flow of data, make it simpler

Fixes a bug; when you clicked a PI row the first time, its tasks wouldn't load. If you did it again, everything worked. The way the code moved data to the InfoPanel was unclear, cleaning that up made the bug obvious.

* put back psycopg2 and mysqlclient

* Create useProcessModels.tsx

* Create useProcessGroups.tsx

* Update ProcessInstanceCard.tsx

Fixes task count display

* Refactor for top level routing

Keeping all views as children of SpiffUIV2 (will make swapping app easier).

* Update SpiffUIV2.tsx

Routing and view scaffolding set.

* Menu and button nice nice in dark mode etc.

* View transitions

* Process group/model data under control and feeding into view.

* Using RXJS for broadcasting to menu items.

* Update SpiffUIV2.tsx

* Config seemed broken (I couldn't start the app, Vite not found etc.)

I fixed by moving @preact/preset-vite to dependencies (this seems required, probably because it adds types and primitives that are used in runtime code or something) and making sure Node was up to date.

* Fix for Preact breaking rendering lifecycle

One of their PRs put a ridiculously low check on rerenders, and in dev/debug mode throws an app-crashing error, which affected the MUI-X Datagrid.

* Button components aware of stream

Also had to add a way for buttons to know what the view they nav to was loaded from the URL (e.g. a bookmark) to meet the design req.

* Have to make sure buttons that have no paths don't respond to href load logic.

* Layout for components, menu, treeview, theme tweaks

Needed to alter text.secondary at theme level to accommodate designs.

* Recurse through Process Group data to PM tree build tree for display

All set.

* Treeview complete

Also moved some things around to track with evolving app structure.

* Fully working tree with counters.

* Favorites/Recently used layout, components, icons, etc.

* Favorites and process groups displays

A bit naive, but for now gets the job done.

* Select of a group CArdor a group in the Tree updates view

Display PMs and PGs for any group, and some ideas to tie selecting a Card into the Tree. This kind of has to work, if you don't do it the tree seems useless.

* Create TreeItem wrapper

TreeItems don't carry any data that could be used for crumbs. Need to wrap TreeItem and add a property that lets you expand any node anywhere in the hierarchy.

* Update __init__.py

* Update StartProcess.tsx

Scrolling content area

* Tree expansion from cards working as expected

Have to do the collapse side of it, but so far so good. Also tweaks to scrolling area.

* Wrap search bar and padding tweaks

More explicit layout around child components.

* Tree/card tracking working.

Highlighting based on clicks, etc, very fancy.

* Tree -> Cards -> Tree fully working, starting breadcrumbs.

Breadcrumbs will be how this works on mobile, nobody will use the tree on a phone.

* Collapse button will be used all over

* More wiring details tree -> card -> tree -> search

When search returns results, the tree or card nav is no longer the control. Use imperative ref to wipe expanded nodes. Also, make sure that if models and groups are returned that the accordions expand.

Remove console logs.

* Cross group model highlighting

Tricky one: If you have several folders expanded in the tree, and are clicking through the models, if you click a model in a "non active" group, we have to clear the current group assets and load that group's. Since the cards come after the switch, they don't hear the clickstream that initiated them, so the model that was selected in the tree won't update the associated card's style. Fix that by passing in the lastSelected object to the cards and inspecting on init.

* Localstorage, favorites, default favorite view (vs. groups), etc.

* Guard no groups.

* Update StartProcess.tsx

Padding change opened up window, needed to adjust.

* Update StartProcess.tsx

* Update LocalStorageService.ts

Update empty string to empty array.

* Tree panel collapse/expand

With everything else going on, this was tricky to get responsive, but working as expected now. Also tweak to fix annoying thing in MenuItems. Also made sure dark mode tracks.

* Hover effects for cards and text cleanups

Hover is useless on touch screens, but otherwise this is a bit more in keeping with the design.

* Breadcrumbs, root element and favorites in collapse tree view, etc.

This pretty much nails it.

* Add Favorite Count

Add count to favorites indicators. Helps user make sense of "I'm clicking it why are no items loading (because there are zero favorites).

* Docs, cleanup

Also fix that NavBar logo issue in the "old" app.

* fix breadcrumb re-render issue when saving json file for first time w/ burnettk

* fix / ignore eslint issues

* add types for react-slick

* ignore ts error

* revert nav bar to undo logout logo change w/ burnettk

* Update spiffworkflow-frontend/src/a-spiffui-v2/views/Dashboards/infopanels/ProcessInfo.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update spiffworkflow-frontend/src/a-spiffui-v2/views/StartProcess/StartProcess.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Tim Consolazio <tcoz@tcoz.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-07-09 10:39:29 -07:00
Kevin Burnett fed785b50c
fix a couple cypress test issues (#1267)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-24 05:02:15 +00:00
jasquat 9d16a2a5c3
use-react-link-for-links (#1242)
* use the react Link component to render links w/ burnettk

* removed old code w/ burnettk

* use a tag for external links according to coderabbit w/ burnettk

* click the nav expander again to close in cypress tests w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-20 13:24:07 -07:00
jasquat 709a0c8492
Merge guest flow into unauth flow (#1233)
* removed some portions of the guest access flow in favor of the unauthed flow w/ burnettk

* removed guest access from auth flow in backend w/ burnettk

* updated frontend to use new public api for guest tasks

* fixed tests and updated get task url script to choose between public and non public urls

* removed old guest task support from frontend

* return 404 when a task cannot be found w/ burnettk

* fixed typo in group list tiles w/ burnettk

* added cypress tests for public formg w/ burnettk

* display metadata key for urls instead of values w/ burnettk

* updated permissions for acceptance testss w/ burnettk

* set up permissions for public group if it is in the list and login and logout admin user in ci to ensure permissions are set w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-19 11:52:27 -07:00
jasquat 18600189c8 Feature/background proc with celery (#788)
* WIP: some initial test code to test out celery w/ burnettk

* some cleanup for celery and added base model to put tasks waiting on timers

* removed dup bpmn file

* some more cleanup and added strategy to queue instructions

* some minor code changes w/ burnettk

* remove the unused next_task key from api calls since nobody uses it w/ burnettk essweine

* added migration for future tasks and added test to make sure we are inserting into it w/ burnettk essweine

* ensure future task run at time can be updated w/ burnettk

* added table to queue instructions for end user in w/ burnettk

* added test to ensure we are storing instructions for end users w/ burnettk

* added progress page to display new instructions to user

* ignore dup instructions on db insert w/ burnettk

* some more updates for celery w/ burnettk

* some pyl and test fixes w/ burnettk

* fixed tests w/ burnettk

* WIP: added in page to show instructions on pi show page w/ burnettk

* pi show page is fully using not interstitial now w/ burnettk

* fixed broken test w/ burnettk

* moved background processing items to own module w/ burnettk

* fixed apscheduler start script

* updated celery task queue to handle future tasks and upgraded black and set its line-length to match ruff w/ burnettk

* added support to run future tasks using countdown w/ burnettk

* build image for celery branch w/ burnettk

* poet does not exist in the image w/ burnettk

* start blocking scheduler should always start the scheduler w/ burnettk

* add init and stuff for this branch

* make this work not just on my mac

* send other args to only

* added running status for process instance and use that on fe to go to show page and added additional identifier to locking system to isolate celery workers better w/ burnettk

* fixed typing error that typeguard found, not sure why mypy did not w/ burnettk

* do not check for no instructions on interstitial page for cypress tests on frontend w/ burnettk

* do not queue process instances twice w/ burnettk

* removed bad file w/ burnettk

* queue tasks using strings to avoid circular imports when attmepting to queue w/ burnettk

* only queue imminent new timer events and mock celery

* some keyboard shortcut support on frontend and added ability to force run a process instance over the api w/ burnettk

* some styles added for the shortcut menu w/ burnettk

* pyl w/ burnettk

* fixed test w/ burnettk

* removed temporary celery script and added support for celery worker in run server locally w/ burnettk

* cleaned up migrations w/ burnettk

* created new migration to clean up old migrations

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2023-12-05 11:41:59 -05:00
jasquat c3fdbc0f69 remove pilot cypress tests and update others for admin in path removal w/ burnettk 2023-09-25 16:03:46 -04:00
jasquat 800b61cf36 fixed pagination of log tables and broken cypress tests w/ burnettk (#382)
* fixed pagination of log tables and broken cypress tests w/ burnettk

* wait before clicking the profile button instead of after w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-07-10 14:06:55 -04:00
jasquat dda0c0f717 fixed failing cypress test 2023-05-19 11:24:50 -04:00
jasquat 9e57be25a4 some updates for NDR_PP1 cypress tests w/ burnettk 2023-05-10 15:49:55 -04:00
jasquat b41df276f5 fixed cypress tests w/ burnettk 2023-05-10 14:05:07 -04:00
Madhurya Liyanage ff078cbc80 Updated button paths and added some waits 2023-05-09 21:36:54 +05:30
jasquat b1f9bbc475 fixed some cypress tests w/ burnettk 2023-04-24 14:40:42 -04:00
jasquat 649d454bc0 moved NDR_PP1 tests to pilot dir and default configs back to what they were w/ burnettk 2023-04-06 11:42:24 -04:00
Madhurya Liyanage 07dacdff99 Merge branch 'main' of https://github.com/sartography/spiff-arena 2023-04-06 20:17:13 +05:30
Madhurya Liyanage 67a1f152e6 Updated the button click to support when there are multiple processes for the user 2023-04-06 20:01:24 +05:30
jasquat d2d0e7e992 attempted to fix some cypress tests 2023-03-23 17:34:08 -04:00
jasquat 2464ad9a26 some updates for cypress pp1 test w/ burnettk 2023-03-09 10:59:20 -05:00
jasquat 94776a78b5 some minor tweaks and turn off debug logging for spiff step details w/ burnettk 2023-03-06 16:16:55 -05:00
jasquat 4ee7b299f2 pyl and fixed cypress tests w/ burnettk 2023-03-06 11:59:33 -05:00
burnettk 342e6091c5 finish test for pp1 2023-03-06 00:48:07 -05:00
burnettk a71754e722 add start of pp1 test 2023-03-04 23:48:23 -05:00
jasquat 8a421bfb2c corrected cypress env var 2023-02-16 13:31:08 -05:00
jasquat a98892be32 added some support for using the backend openid server for cypress tests w/ burnettk 2023-02-16 12:09:44 -05:00
jasquat d70acde4c0 fixed cypress tests 2023-01-16 12:24:02 -05:00
burnettk 479969db16 Merge remote-tracking branch 'origin/main' into bug/cypress-tests 2023-01-04 20:58:03 -05:00
jasquat 4b328df7c5 allow tests to determine what paginated entity id to use to determine a table has loaded 2022-12-30 09:13:03 -05:00
burnettk 744460fdbf make pagination test work for instances as well 2022-12-28 23:25:03 -05:00
burnettk 492f9478fc fix another race conditions in instance cypress test 2022-12-28 23:14:17 -05:00
burnettk 5199555996 delete videos on success and address race condition in cypress test 2022-12-28 22:55:46 -05:00
jasquat 3e26226514 some cypress tests w/ burnettk 2022-12-27 15:42:22 -05:00
burnettk f171ab49a4 Merge remote-tracking branch 'origin/main' into bug/cypress-tests 2022-12-20 22:05:21 -05:00
mike cullerton 9870a0b040 fixed process model tests 2022-12-15 17:59:01 -05:00
jasquat d95a05a60a process model cypress tests are passing w/ burnettk 2022-12-14 17:45:31 -05:00
jasquat 1e62a77e81 some fixes for ci w/ burnettk 2022-12-14 17:09:43 -05:00
jasquat 19333e38b2 fixed cypress tests 2022-11-23 09:38:45 -05:00
jasquat 1ec8d68ce9 the misc group is now 99-Misc 2022-11-22 07:32:27 -05:00
burnettk 54ae3104e9 fix tests and add frontend tests 2022-11-21 22:09:13 -05:00
jasquat de392c9fd1 task cypress tests are passing w/ burnettk cullerton 2022-11-21 16:47:04 -05:00
jasquat 5970ad04e0 process model cypress tests are passing w/ burnettk cullerton 2022-11-21 16:19:55 -05:00
jasquat 53d8b3f140 make sure to pass the correct form of process group id when creating a process model w/ burnettk cullerton 2022-11-21 15:39:33 -05:00
jasquat 92d77f3a51 allow getting all process models, process instances should not save when they are initialized, and fixed some cypress tests w/ burnettk 2022-11-21 14:12:04 -05:00
burnettk 19c7ae3275 add cypress grep 2022-11-15 22:34:28 -05:00
jasquat 22ad31300a merged in and recsovled conflicts of frontend tree w/ burnettk 2022-11-09 15:03:43 -05:00
jasquat c1c95aafa5 process instance cypress tests pass now w/ burnettk 2022-11-09 14:51:22 -05:00
jasquat afa8aae60e process model cypress tests are passing 2022-11-09 10:12:13 -05:00
burnettk 2cda810a04 fix process model create and a couple tests, docker build refactor 2022-11-08 22:36:39 -05:00
jasquat 06e5d05d51 fixed some acceptance tests w/ burnettk cullerton 2022-11-08 17:20:17 -05:00
burnettk a346df8059 fix a few tests 2022-11-04 17:14:48 -04:00
jasquat b165608430 instances tests are mostly passing, issues with table resizing on the list w/ burnettk 2022-11-04 15:07:40 -04:00
jasquat 8a7a7f3de2 process group cypress tests are passing w/ burnettk 2022-11-04 12:20:55 -04:00