Skip to content

Virtual assistant for contextual support in Legend Studio#1166

Merged
akphi merged 34 commits intofinos:masterfrom
akphi:pierred
May 31, 2022
Merged

Virtual assistant for contextual support in Legend Studio#1166
akphi merged 34 commits intofinos:masterfrom
akphi:pierred

Conversation

@akphi
Copy link
Contributor

@akphi akphi commented May 13, 2022

Summary

Details of implementation for #1072

  • Read the contextual doc registry
  • Add the component at the top-level of the app so it pops even when we have a backdrop
  • Have an eye-catchy motion when there is new event and we found some contextual doc
  • Deal with the eye-catchy animation when we switch from one contextual doc to another, how can we replay that animation?
  • When there are contextual help items, we could show an indicator, when being hovered on, we should have a tooltip showing contextual support available
  • Refactor ClassEditor to have different pages
  • Change the assistant trigger icon to X icon when the assistant is open
  • Bump up the virtual assistant popover (or non-modal dialog) when clicking on the assistant
  • Think of the design for multiple tabs in the virtual assistant
    • Design the tabs like how we do aux panel
    • Have a welcome page when there's no search keyword
    • Contextual Help Tab: Show contextual suggestions in this tab
    • General Help Tab: Allow searching in the virtual assistant popover - Consider using https://www.npmjs.com/package/fuse.js
    • Show number of results next to the clear/search icon in search <input>
  • Click help in the menu will open the assitant to the general help tab
  • Allow hiding the assistant, if hidden, the popover will open to the left, not touching the bottom of the app; otherwise, the popover will open to the top, not touching the right edge of the app
    • When hiding the assistant, close the popover
  • Improve existing doc library
    • use dot-case for eventKey and docKey
    • add question/title for existing DSL and element grammar docs
  • Create application context service:
    • the service holds a stack of context that mirrors how user navigate the application
    • the virtual asistant will react to the top context to find relevant documentation
  • Created Event Service in ApplicationStore - We will use this to keep track of posted event and have a note that in the future we might change this to a queue for storing event, always look at the latest event for the assitant though.
  • Improve the current way we configure and override documentation entries
  • Allow extending/override contextual documentation
  • DEBUG Have a context-menu/button to copy the context ID and documentation key, also allow downloading the whole documentation (contextual included) registry
  • Support drag-and-drop for virtual assistant - use react-dragable
    • Make the assistant position auto - so the panel doens't get cropped off
    • Bound DnD to edge of screen
    • While dragging, hide the panel, re-show when done with dragging
    • While dragging, alter the cursor to grabbing
    • Restyle the trigger: account for right edge/border color as well
    • When collapsed, auto-reset to default position
    • Support context menu from the trigger to reset to default/hide assistant
  • Show loading indicator when searching
  • Have a button on status bar to toggle assistant

How did you test this change?

  • Test(s) added
  • Manual testing (please provide screenshots/recordings)
  • No testing (please provide an explanation)

Screenshots and videos

Legend Taxonomy without header

Legend Taxonomy

Share project button (moved to project overview panel)

share.project.mov

Go-to-homepage/setup button (moved to menu)

back.to.home.page.mov

Improved About dialog

new.app.info.modal.mov

Documentation search and general assistant

search.documentation.mov

Contextual documentation (class editor case)

contextual.documentation.mov

@changeset-bot
Copy link

changeset-bot bot commented May 13, 2022

🦋 Changeset detected

Latest commit: d1c36ab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 33 packages
Name Type
@finos/legend-application Major
@finos/legend-art Minor
@finos/legend-graph Minor
@finos/legend-studio Major
@finos/legend-taxonomy Patch
@finos/babel-preset-legend-studio Patch
@finos/eslint-plugin-legend-studio Patch
@finos/legend-dev-utils Patch
@finos/legend-extension-dsl-data-space Patch
@finos/legend-extension-dsl-diagram Patch
@finos/legend-extension-dsl-persistence Patch
@finos/legend-extension-dsl-text Patch
@finos/legend-extension-external-format-json-schema Patch
@finos/legend-extension-external-language-morphir Patch
@finos/legend-extension-external-store-service Patch
@finos/legend-extension-mapping-generation Patch
@finos/legend-graph-extension-collection Patch
@finos/legend-manual-tests Patch
@finos/legend-model-storage Patch
@finos/legend-query Patch
@finos/legend-query-app Patch
@finos/legend-query-deployment Patch
@finos/legend-server-depot Patch
@finos/legend-server-sdlc Patch
@finos/legend-shared Major
@finos/legend-studio-app Patch
@finos/legend-studio-deployment Patch
@finos/legend-studio-extension-management-toolkit Patch
@finos/legend-studio-extension-query-builder Patch
@finos/legend-taxonomy-app Patch
@finos/legend-taxonomy-deployment Patch
@finos/legend-tracer-extension-zipkin Patch
@finos/stylelint-config-legend-studio Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@akphi akphi marked this pull request as draft May 13, 2022 20:18
@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #1166 (d1c36ab) into master (436264a) will decrease coverage by 0.34%.
The diff coverage is 26.27%.

@@            Coverage Diff             @@
##           master    #1166      +/-   ##
==========================================
- Coverage   42.48%   42.13%   -0.35%     
==========================================
  Files        1133     1138       +5     
  Lines       50284    50729     +445     
  Branches    11523    11629     +106     
==========================================
+ Hits        21364    21376      +12     
- Misses      28849    29283     +434     
+ Partials       71       70       -1     
Impacted Files Coverage Δ
...-application/src/application/LegendApplication.tsx 8.00% <ø> (ø)
...src/application/LegendApplicationPluginManager.tsx 0.00% <ø> (ø)
...d-application/src/components/DocumentationLink.tsx 20.00% <0.00%> (ø)
.../legend-application/src/stores/ApplicationStore.ts 18.18% <0.00%> (-0.92%) ⬇️
...cation/src/stores/LegendApplicationEventService.ts 0.00% <0.00%> (ø)
...gend-application/src/stores/PureLanguageSupport.ts 15.38% <ø> (ø)
...kages/legend-art/src/components/ResizablePanel.tsx 10.71% <0.00%> (ø)
packages/legend-art/src/components/TypeIcon.tsx 0.00% <ø> (ø)
...s/legend-art/src/components/popover/BasePopper.tsx 0.00% <0.00%> (ø)
...s/studio/DSLDataSpace_LegendStudioDocumentation.ts 0.00% <0.00%> (ø)
... and 111 more

@akphi akphi force-pushed the pierred branch 9 times, most recently from 2904307 to 646a623 Compare May 28, 2022 13:33
@akphi akphi marked this pull request as ready for review May 28, 2022 15:26
@akphi akphi changed the title ... Virtual assistant for contextual support in Legend Studio May 28, 2022
@MauricioUyaguari

This comment was marked as off-topic.

@akphi akphi force-pushed the pierred branch 2 times, most recently from 4751628 to 07dde49 Compare May 31, 2022 04:58
@akphi akphi merged commit 41805db into finos:master May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-present CLA Signed

Projects

None yet

2 participants