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

Dashboard directory interactivity #6279

Merged
merged 272 commits into from
Apr 26, 2023

Conversation

somebody1234
Copy link
Contributor

@somebody1234 somebody1234 commented Apr 14, 2023

Pull Request Description

Adds modals:

  • upload file modal in drive bar
  • context menus
  • forms to create files
  • drop to upload
  • adds permissions display in the "shared with" column with placeholder user avatar

Screenshots

Upload file dialog (triggered by upload icon at top of screen)
image
Asset creation dialog. Each asset table has its own dialog. Opens from the (+) on the leftmost column header.
image
Drag-n-drop to upload file dialog (occupies entire screen)
image
Context menu (different actions for each asset type, and labels)
image

Important Notes

N/A

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@PabloBuchu
Copy link
Contributor

PabloBuchu commented Apr 19, 2023

@somebody1234 I see that + button next to the projects uses cloud API regardless the desktop/cloud flag. It should behave like in this PR #6071 later once we introduce the mode cloud/local switcher it should respect that also

For now when running in electron it should use createProject from ProjectManger

Also when running in Electron I can add assets (Files, secrets etc) but they are not shown in the table view

Copy link
Contributor

@PabloBuchu PabloBuchu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see the comments when running in electron

@somebody1234
Copy link
Contributor Author

@PabloBuchu because the current implementation in that PR creates an alternative backend, everything should work with little to no changes after that PR is merged in. the project manager doesnt expose endpoints for the other asset types though, so i'm not sure what should be done - maybe either hide them completely, or change the message to say it's not yet supported for local projects, or just return an empty array

@somebody1234
Copy link
Contributor Author

as for the assets not being shown, it's because the desktop IDE only supports the local backend, not the cloud backend in this PR.
this should already be fixed in the cloud/desktop switcher

@somebody1234
Copy link
Contributor Author

oh actually there's no way to detect whether something is supported other than explicitly checking backendPlatform

@PabloBuchu
Copy link
Contributor

PabloBuchu commented Apr 19, 2023

@somebody1234 lets hide Directories/Files/Secrets when opened in Electron app and in desktop mode. It still should be visible in electron when user uses cloud thou

One thing I guess we need to also integrate add project functionality with the templates once the PR are merged together

@PabloBuchu PabloBuchu added the CI: No changelog needed Do not require a changelog entry for this PR. label Apr 24, 2023
@PabloBuchu
Copy link
Contributor

@somebody1234 can we hide folders/secrets/files while using electron? then would love to merge it

@somebody1234
Copy link
Contributor Author

@PabloBuchu this will be fixed in #6308 - but I guess it doesn't hurt do implement it here as well

@somebody1234
Copy link
Contributor Author

@PabloBuchu fix has been pushed

@PabloBuchu
Copy link
Contributor

PabloBuchu commented Apr 25, 2023

@somebody1234 the #6071 was merged so I guess we need to merge and integrate new project templates here before merging

@PabloBuchu
Copy link
Contributor

PabloBuchu commented Apr 26, 2023

@somebody1234

  1. when I click on new project or any template I can see in logs that project manager successfully creates the project but nothing is being added to the table. An item shows up after the reload.. we need to fix that. Its happening for both cloud and desktop versions
  2. Adding project in subdirectory stopped working. I can see in the console the parent_directory_id parameter is null

@somebody1234
Copy link
Contributor Author

somebody1234 commented Apr 26, 2023

  1. committed a potential fix but could not test because of issues with backend
  2. should be fixed, tested on cloud because desktop ide doesn't have backend switcher on this PR

@somebody1234
Copy link
Contributor Author

(i've just committed a commit to hide the placeholder data, because i figured it doesn't really matter where it's done, and it's probably not worth its own PR - especially since this one is already changing so much)

@PabloBuchu PabloBuchu merged commit 3d045a7 into develop Apr 26, 2023
@PabloBuchu PabloBuchu deleted the wip/somebody1234/dashboard-directory-interactivity branch April 26, 2023 09:52
Akirathan pushed a commit that referenced this pull request Apr 26, 2023
* turn object into var

* add todo

* fix style

* fixes

* remove forgot password + reset password

* remove signout

* remove setusername

* remove login

* remove registration

* fix comments

* re-enable flag

* rename div

* add comment

* fix lints

* remove tailwind conf

* Revert "remove registration"

This reverts commit 02439c9.

* Revert "remove login"

This reverts commit 8e6f9c1.

* Revert "remove setusername"

This reverts commit 84721bc.

* Revert "remove signout"

This reverts commit 08a96d3.

* Revert "remove forgot password + reset password"

This reverts commit e52f51a.

* remove opener

* move opener

* tmp

* prettier

* expand docs

* tmp

* replace react-scripts with craco

* add tailwindcss

* switch to brands

* tmp

* tmp

* tmp

* fixmes

* fixmes

* fixmes

* fixmes

* fixmes

* fixes for e-hern's comments

* use abortcontroller

* add docs

* fixes

* revert craco, fix windows build

* remove from gitignore

* remove unnecessary check

* tmp

* augment window

* tmptmp

* split errors back up

* tmp

* tmp

* prettier

* fix

* Fix lints

* Prepare for addition for `as T` lint

* Add lint for early returns

* Address review issues

* Fix lints

* remove withrouter

* fix file length

* fixes

* fixes

* remove dashboard

* fix

* use switch

* prettier

* fixes

* prettier

* fixes

* run prettier

* run prettier

* run prettier

* fix main page url

* allow node.js debugging

* fix lints

* change not equal

* prettier

* Remove references to withRouter; fix lints

* Run prettier

* Add cloud endpoints

* Add JSON-RPC endpoints

* Add dashboard skeleton

* Add components and edit dashboard

* Run prettier

* (WIP) Add cloud endpoints

* Add rpc endpoints

* Address review issues

* Formatting and minor fixes for `newtype.ts`

* Address review issues

* Rename `Brand` to `NewtypeVariant`

* Rename `Brand` to `NewtypeVariant`

* Fix formatting in `newtype.ts`

* Switch dashboard to esbuild

* Minor fixes; move Tailwind generation into esbuild-config

* Fix watching `content/` and `client/`

* Bump esbuild binary versions; minor dependency list fixes

* Add dashboard skeleton

* Run prettier

* Fixes; rename "npm run dev" to "npm run watch-dashboard"

* Avoid writing esbuild outputs to disk for `dashboard/`

* Convert watch-dashboard to be fully in-memory; rebuild css files on change

* Remove obsolete FIXME

* Remove unused constants

* Run prettier

* add missing styles

* Fixes

* Fix the fixes

* Run prettier

* Fixes; use nesting plugin to wrap tailwind preflight

* Remove testing flag from client/watch

* Minor fixes

* Run prettier

* Export newtypes

* Make css rebuild when tailwind config changes

* Fix endpoints

* Finish copying changes over

* Remove duplicate type definitions

* Fix bundling for dashboard

* Fix dashboard/bundle.ts erroring when build directory does not exist

* Move CSS to Tailwind config

* Run prettier

* Update endpoints

* Fix esbuild binary package names

* Remove redundant "npx" prefix from build scripts

* Remove unused dependency

* Begin adding interactivity

* workaround for mac freeze

* Fix modal bugs

* Begin implementing forms, split forms and modals into new files

* Get form UI working

* add missing sections

* Minor fixes, save current directory to localStorage

* Fixes for drop-to-upload

Note: currently it is opening in a new tab instead of actually uploading

* Address review issue

* Fix prettier config; run prettier

* Fix live-reload of `npm run watch-dashboard`

* (WIP)

* Fix service worker for client-side routing

* Add close button to asset creation forms; fix saving directory to localStorage

* Remove workaround for backend bug when listing directories

* Fix drop-to-upload

* Fix sizing

* Fix spacing, add fixed paths

* WIP: fix toast notification styles, begin adding context menu

* WIP: Add context menu, minor fixes

* Fix authentication on desktop IDE

* Allow unused locals and parameters in tsconfig.json

* Run prettier

* Fix TypeScript errors

* Fix modals; minor refactor

* Implement context menus for labels; fixes

* Add modal provider and switch all modals to provider; fixes

* Fix modals and user icon size

* Fixes

* Remove obsolete files from incorrect merge

* Address review issues

* Fix type error

* Stop removing `#root`

* Fixes for cloud

* Implement search on frontend side

* Fix race condition related to `directoryId`

* Hide directories, files and secrets tables on desktop IDE

* Fix lint errors

* Properly update visible projects when a project is created

* Pass directory id to create project

* Hide column display switcher; remove placeholder column data

---------

Co-authored-by: Nikita Pekin <nikita@frecency.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
Procrat added a commit that referenced this pull request Apr 27, 2023
* develop:
  Passing events to sub-widgets in List Editor and refactoring of the slider component. (#6433)
  Revert "Cloud/desktop mode switcher (#6308)" (#6444)
  Widgets integrated with graph nodes (#6347)
  Table Visualization and display text changes. (#6382)
  Skip redundant compilations (#6436)
  Add parse extensions to Text type. #6330 (#6404)
  Cloud/desktop mode switcher (#6308)
  Replace Table should_equal with should_equal_verbose (#6405)
  Rollback event handling changes for the mouse (#6396)
  Dashboard directory interactivity (#6279)
  Ability to change the execution environment between design and live. (#6341)
  Implementation of elements adding to List Editor and a lot of internal API (#6390)
  Drop method exported from WASM + removing leaks. (#6365)
  Turn null into UnexpectedExpression when Union type is incomplete (#6415)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants