-
Notifications
You must be signed in to change notification settings - Fork 2
Dynamic TAK content from a Rune tool generated JSON file #33
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
base: main
Are you sure you want to change the base?
Conversation
a5cca34
to
920f492
Compare
c68d560
to
c86caaf
Compare
…he last accordion in the content + added translation for custom label
786cb52
to
722f9b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running with backend (1.9.0+integration api),
pvarki/docker-rasenmaeher-integration#148
few issues:
1. need caching / optimization
- long loading time the 'rune.json' from integrationapis
- presently it does not cache it so we get waiting each time we go homepage
2. backend version 1.9.0 probably borks something
Or the backend/takintegrationapi won't deliver:
3. complex?
Product/ProductContentRenderer is 650 lines long.
Ofc it offers supports for every our reactcomponent but it still seems heavy. Options I could think of:
- Break the component support down for product/renderer/{component} for each our component (also make the idea of Rune library bit more portable, so that we can write component support for Rune for each new component we happen to want to make
- Larger question, is this the approach best we could take? It kind of feels of an ui inside our ui.
-
- I mean if we'd lighten up rune-dynamic-content to just couple of modals, dropdowns and buttons you ought to deliver in RMUI. Then deliver the actual userguides utilizing https://github.com/pvarki/Docusaurus-docs
-
- Though we would have to solve this dynamism once again, but there probably docusaurus-md & supported reveal-js would do the CSS magic to render them instead of having work it all custom.
-
- If so, work wasn't futile though because Order App (refactored) might benefit from the approach, As it - at least -should offer comparatively large amounts of information about {products} available Today, anyway.
4. Need docs
Going to need a sequencediagram of what happens, though looking it for a while makes the basic idea understandable
Okay, so some talks & progress with @karppo & backend:
|
Implements a dynamic tak documentation from a JSON file generated by the Rune YAML preprocessor tool.
This is not currently complete refactoring, but can be changed to use the old components which are still present.
Starting points where the implementation is in use:
SoldierView.tsx
:<ServiceView name={'ServiceTak'} />
, original was<ServiceTak />
AdminHomeView.tsx
:<ServiceView name={'ServiceTak'} />
, original was<ServiceTak />
i18n.ts
: use ofCONTENT_SERVICE
there to load translationsContentService.ts
: This file reads the data from./data/tak.json
ProductContentRenderer.tsx
: Every implementation is in therender()
methodWhen/if you edit YAML files inside the data folder, you need to run the
make build
at./data
folder. This can be automated for development by: