yaptide / ui

Yet Another Particle Transport IDE - frontend
https://yaptide.github.io/web_dev/
GNU General Public License v3.0
9 stars 4 forks source link

Separate components per simulation instead of if-ology in the component logic #1612

Open grzanka opened 5 months ago

grzanka commented 5 months ago

Main component for "common" scenario. Two separate components which are children of common component and inject additional fields dedicated to given simulator (Fluka and SHIELD-HIT12A).

grzanka commented 5 months ago

@ostatni5 any other good ideas to have nice architecture of components for all simulators

ostatni5 commented 5 months ago

One of my ideas would be to create more generic components that parse config and display appropriate inputs based on that config. Each simulator would require a config object that would define what type of input display, its label, and what would happen after change.

Another approach would be to compose component from per simulator components.

If I have some free time, I could try to construct a proof-of-concept branch.