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

Refactor automaton + refactor file loading + add example projects + add recent projects #99

Merged
merged 56 commits into from
Nov 30, 2023

Conversation

atjn
Copy link
Collaborator

@atjn atjn commented Nov 8, 2023

This makes a bunch of improvements to the automaton structure:

  • classes are moved into subfolders to make it easier to tell what is what
  • numbers are now validated to be a safe range
  • ID's are now parsed and put into ID maps, enabling easy and safe operations, such as:
    • adding a new unique id
    • testing that an Id is unique
    • accessing a member from an id
  • introduced relative positions to make UI work simpler
  • the code is simplified by using typescript constructor syntax
  • all automaton classes now inherit from a common class
  • the fromRaw and toRaw processes have been standardized to make it less uncertain how they are serialized

It also introduces a standardized format for loading and saving projects. Previously, this was hard coded into each adapter.
The format includes a standard JSON format for an entire project, and a standardized structure to map that JSON file to/from the file system.

Finally, it introduces example projects and recent projects. Example projects are bundled from Ecdar-Common and make it easy to get started with a project. Recent projects is a list of previous projects that the user can click on to instantly load a project they were working on.

I am aware that this is a massive PR, I am very sorry. All of these functions are tightly coupled and thus have a big influence on how the others should be implemented. I found that it was very hard to build them separately, so I combined them instead.

Closes #105
Closes #106
Closes #82
Closes #137
Closes #138

This work is blocking a lot of other work, so we have decided to merge it now, despite it missing a few things:

  • Testing is being worked on in a different branch
  • A pretty UI for the start screen is being worked on in a different branch
  • Minor compiler warnings have TODO's in the code

Copy link

netlify bot commented Nov 8, 2023

Deploy Preview for ecdar ready!

Name Link
🔨 Latest commit 65207d1
🔍 Latest deploy log https://app.netlify.com/sites/ecdar/deploys/6567c3ba16c8b30007ac9b99
😎 Deploy Preview https://deploy-preview-99--ecdar.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@atjn atjn changed the title Refactor automaton + refactor file loading + add example projects Refactor automaton + refactor file loading Nov 13, 2023
atjn added a commit that referenced this pull request Nov 16, 2023
These annotations are not necessary, as they are already written in typescript. If we change anything in this file, it will cause a major merge conflict with #99
BaBrixx added a commit that referenced this pull request Nov 17, 2023
* Using AbortController and PointerCapture correctly. Also updated comments.
* Revert changes in svgview

These annotations are not necessary, as they are already written in typescript. If we change anything in this file, it will cause a major merge conflict with #99

---------

Co-authored-by: Nyby <[email protected]>
@atjn atjn changed the title Refactor automaton + refactor file loading Refactor automaton + refactor file loading + add example projects Nov 20, 2023
TSKsmiley and others added 7 commits November 20, 2023 15:28
Fixes a few bugs so projects are loaded correctly now. Also made a few changes to make the adapter usable outside of the browser context.
A few fixes to make it easier to use the automata
Co-authored-by: Albert Hald <[email protected]>
@atjn atjn marked this pull request as ready for review November 27, 2023 17:17
@atjn atjn changed the title Refactor automaton + refactor file loading + add example projects Refactor automaton + refactor file loading + add example projects + add recent projects Nov 29, 2023
@atjn atjn enabled auto-merge (squash) November 29, 2023 10:40
TSKsmiley
TSKsmiley previously approved these changes Nov 29, 2023
@atjn atjn requested a review from DenFlyvendeGed November 29, 2023 10:43
Copy link
Contributor

@DenFlyvendeGed DenFlyvendeGed left a comment

Choose a reason for hiding this comment

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

It's going to look great :D

src/lib/classes/fileSystem/FileSystemTauri.ts Outdated Show resolved Hide resolved
src/lib/components/project/ProjectItemDropDownMenu.svelte Outdated Show resolved Hide resolved
src/lib/components/query/QueryNav.svelte Show resolved Hide resolved
src/lib/classes/automaton/raw/RawQuery.ts Show resolved Hide resolved
Copy link
Contributor

@DenFlyvendeGed DenFlyvendeGed left a comment

Choose a reason for hiding this comment

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

LGTM

@atjn atjn merged commit 7b93e3f into main Nov 30, 2023
5 checks passed
@atjn atjn deleted the automaton-refactor branch November 30, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants