spaceteam / pnid_houbolt Goto Github PK
View Code? Open in Web Editor NEWdynamic and interactive P&ID
License: GNU Lesser General Public License v3.0
dynamic and interactive P&ID
License: GNU Lesser General Public License v3.0
First minimum viable product of dynamic popups is pushed on dev. Needs to be expanded to contain things like text entry, graphs and maybe to look a bit better
Originally posted by @LuPro in #6 (comment)
so eg: fuel press and depress are controlled by the same popup.
Interacting with popup inputs calls js methods like onDigitalCheck
, but those functions are empty right now, nothing happens.
The functions need to update their own popup and send out data to the LLServer to actually send out this data
Save my burning eyes ๐ญ
Probably related to bootstrap being loaded online instead of locally. Fallback when no connection? Download locally?
Googlefonts Montserrat also not available without connection, but that has a viable fallback already (Some Times-like serif font)
Instead of having it in a config JSON let it be a field in kicad (defaults can't really be handled this way, but it may make more sense for the custom overrides)
popups that are shared between elements via an "input_reference" field from kicad currently don't correctly update their values. They update based on a value from one of the pnid elements instead of listening to the input reference variable (which would be something like a computed state on llsever side). This probably needs work on the logic that runs updatePopups (this logic needs to also check popups for suitable state names, because the computed states don't have a corresponding pnid element, just a corresponding popup)
when opening a popup with a slider and having new data received it correctly updates all labels and the slider position. After moving the slider manually once it stops updating the slider position (labels still update) until closed and opened again.
(Branch FEATURE/dev/dynamic_popups, since commit f2eac58)
I dislike my code, functions became too long and complex, the data flow is weird and it's overall kind of ugly. Refactor!
If a state update gets sent that has no pnid element in the currently loaded pnid, send a warning. Needs #2 to be implemented so repeat messages can be ignored. (maybe also some sort of setting that disables it per default? url parameter?)
Only chromium seems to support pointer-events="bounding-box"
, on firefox and other non-chromium based browsers opening a popup is only possible by hitting an svg line directly (or hitting a text or other filled svg component)
probably best way to implement it, is to create invisible svg <rect>
as hitboxes for each component (in the kicad library definitions of the components).
This would even improve the usability of the pnid behavior in chromium based browsers, as right now the automatically generated bounding box is often too large in actual use (eg: when text for a pnid element gets large it may make the bounding box overlap another pnid element so ideally we'd want to exclude the text from bounding box calculations.
visualize sensor values as graphs in popups
While moving the slider the value output doesn't move anymore (in popup refactor). I think this broke during popup refactoring, but I have no clue why/where/how it broke
the sensor letter (the "P" on pressure sensors, the "T" on temp sensors, ...) seems to catch the click from the popup hitbox. maybe a z-index thing, maybe put it into the group. for creating the bounding box. investigate
Maybe also a button for dismissing similar messages in the future? (How should "similar" be defined? same message type? Same exact message? Maybe need message IDs for internal errors to be able to filter those out if exact messages aren't wanted)
move configs back to file and allow editing through the UI (maybe in popups?)
Take some time and do that
I'm thinking of more and more features that could benefit from client side settings (stored in cookies? localstorage?)
eg:
All this in a neat and tidy settings menu with popup (top right corner?)
Discuss if needed/wanted or should/could be done differently (could instead handle all this via URL parameters)
right now popups and popup layouts are hardcoded, should be created dynamically via the popup
field in the config file. this popup field should support several "lines" that allow for settings and displaying different things (eg: setting the value of the element's statevalue variable while displaying the graph of the value or allowing to set several values via the popup)
after implementing the popup close animation the destroy code isn't called properly anymore and the popups are left as hidden (display: none) but still existant in the DOM. right now this creates no problems in functionality or usability, but could be an issue later and frankly, it's just not nice behavior.
Use something like doxygen or a tool like it to make proper in-code documentation (in addition to the readme.md high level/usage documentation)
variable section to define e.g. threshold values to be used multiple times
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.