Skip to content

Feature: Create EE workflow logic and structure#907

Merged
mohdsayed merged 132 commits into
developfrom
feat/ee-workflow
Aug 27, 2025
Merged

Feature: Create EE workflow logic and structure#907
mohdsayed merged 132 commits into
developfrom
feat/ee-workflow

Conversation

@mayan-000

@mayan-000 mayan-000 commented Jan 6, 2025

Copy link
Copy Markdown
Collaborator

Description

This PR adds code that enhances the capabilities of the EE workflow

  • Traveller class for outlining figures
  • Add the Figure factory class to encapsulate related logic to figures in one place
  • Checkpoints to enable skipping to the next node, or going back to the previous node
  • Next tip coordinates for assigning guided coordinates
  • Side effect callback that runs when the draw function is done running
  • Add an Arc figure to create a ripple effect
  • Add bubbles barrage logic.
  • Allowing setting custom mouse events for objects during initialization

Relevant Technical Choices

  • Traveller Class
    • This class enables drawing figures/groups, eg, drawing a line progressively from (x1, y1) to (x2, y2).
      • If a figure/group has to be drawn progressively, set shouldTravel value to be true and pass a travelInit callback.
      • travelInit callback has parameters that include the figure instance and a spread array of any values passed to be used.
        • The callback should utilize the figure instance and set three callbacks, setTraveller, setResetTravel, and setCompleteTravel.
          • setTraveller stores the logic that will be used to render figure/group progressively.
          • setResetTravel is used to reintialize the default state to rerender figure(s) progressively.
          • setCompleteTravel callback allows for completion in an instant without progressively drawing the figure(s).
  • FigureFactory Class
    • This class encapsulates the logic of the figure initialization, coordinates calculation, traveller initialization, and any configuration before creating a new figure instance.
      • It contains var and a callback that provides 5 new possible coordinates to the next figure to be drawn.
        • Each figure type has its own callbacks to calculate and provide to the next figure.
        • It provides up, right, down, left, and middle as the 5 possible coordinates for the next figure.
      • Every figure has its method, which has common parameters and some unique to each figure.
        • Encapsulating the instance creation inside a function allows pre-configuration of any properties.
        • Also, it provides easy access for creating instances, rather than calling new for every new instance creation.
  • Main Class
    • This class now contains logic to add checkpoints, and these checkpoints are used to create callbacks to navigate ahead a few nodes or go back.
    • The traveller class is created and used inside this class.
      • Whenever a figure with the shouldTravel property is found true, a new traveller instance is created that hijacks the draw loop, stops the queues and runs the traveller function, which was set during the initialization of the figure.
  • Figure, Group, Animator Class
    • This class now contains logic to set and run a callback whenever the draw function is completed.
      • It allows setting a function that can act as a data updater, communicating from canvas to HTML/JS code.

Testing Instructions

  • To run a demo implementation of the workflow,
  • Open PSAT and in the terminal run command npm run dev:ee-workflow:demo.
  • It should start a Vite server with the demo running on localhost:5173.

Additional Information:

Screenshot/Screencast


Checklist

  • I have thoroughly tested this code to the best of my abilities.
  • I have reviewed the code myself before requesting a review.
  • This code is covered by unit tests to verify that it works as intended.
  • The QA of this PR is done by a member of the QA team (to be checked by QA).

Fixes #

mayan-000 and others added 30 commits December 20, 2024 21:12
@mayan-000 mayan-000 changed the base branch from ee-workflow to develop August 22, 2025 05:55
@mayan-000 mayan-000 changed the base branch from develop to ee-workflow August 22, 2025 11:40
@mayan-000 mayan-000 changed the base branch from ee-workflow to develop August 22, 2025 11:40
@mohdsayed mohdsayed merged commit a0fe47f into develop Aug 27, 2025
6 checks passed
@mohdsayed mohdsayed deleted the feat/ee-workflow branch August 27, 2025 06:01
@mohdsayed mohdsayed restored the feat/ee-workflow branch August 27, 2025 06:01
@mohdsayed mohdsayed modified the milestones: Future Releases, v1.2.0 Oct 1, 2025
@mohdsayed mohdsayed deleted the feat/ee-workflow branch October 1, 2025 14:46
@mohdsayed mohdsayed mentioned this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants