devsoc-unsw / structs.sh

An educational data structures and algorithms platform.
https://structs.sh
MIT License
27 stars 7 forks source link

Size_t as type #698

Closed Dammshine closed 2 days ago

Dammshine commented 2 weeks ago

Describe the bug In the backend, the system is consistently sending size_t as a type that can potentially be annotated by the user, even though we do not intend to accept this type for annotation. I am considering implementing a mechanism to filter out such types that should not be annotated.

There are a few things we need to consider:

  1. Backend Check: Investigate how the backend determines which types to send to the frontend. In the frontend, this logic resides under sendTypeDeclaration. In the backend, it's located in server.py, within the createdTypeDeclaration function.
  2. Frontend Logic: The frontend logic currently generates components based on the type declarations received from the backend. We need to devise a mechanism to add an additional filtering layer between receiving the type declaration and generating the frontend components.
  3. Future Modifications: We should consider potential future modifications to support other visualizations. For example, while we may currently only accept struct types, later on, graph visualizations might require support for plain 2D arrays. We need a sort of abstraction interface/class does this filtering job and can be switched out in frontendStore class.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context The following file contains the code need to edit

Dammshine commented 2 weeks ago

image