57 Commits

Author SHA1 Message Date
Mose Müller
c327215b5f feat: selection range in NumberComponent can be changed using Shift and arrows
When pressing shift, the arrow keys can be used to change the selection
range. This was done by using a cursor position reference instead of a
state and adapting the default behaviour of the arrow keys instead of
writing them from scratch.
2025-05-09 10:54:36 +02:00
Mose Müller
2b520834dc fix: overwrites left and right arrow key behaviour in NumberComponent
The cursor position was not stored when moving the cursor without
changing the number.
2025-01-17 15:42:33 +01:00
Mose Müller
bb6cd159f1 frontend: refactoring minus sign handling in NumberComponent 2024-09-17 16:48:40 +02:00
Mose Müller
c396de75fb frontend: default export useRenderCount hook 2024-07-24 15:06:36 +02:00
Mose Müller
b1e6663c66 frontend: introduces useRenderCount hook
The useRenderCount hook contains all the necessary logic to count the re-render events.
This reduces duplication and code complexity.
2024-07-08 15:10:37 +02:00
Mose Müller
fb251649a0 updates eslint config, fixes linting errors 2024-07-08 08:30:55 +02:00
Mose Müller
73a3283a7d feat: moving from react-create-app to vite
- loads of type fixes
- configuration changes
2024-07-04 16:45:00 +02:00
Mose Müller
a214d6d85a using id as form name for number and string component
This removes errors saying that quotes within element name are not allowed.
2024-04-30 10:02:13 +02:00
Mose Müller
6eaf1a03d1 adds onChange prop to number component form field to remove console errors 2024-04-29 15:20:11 +02:00
Mose Müller
ec1f68ae4a using fullAccessPath as Form name for NumberComponent fixing cursor jumps 2024-04-17 09:21:02 +02:00
Mose Müller
65f63e08ae fixes changing Quantity from frontend 2024-03-28 08:55:58 +01:00
Mose Müller
31f280c9cb frontend components pass actual readOnly and docString values to backend 2024-03-27 15:20:50 +01:00
Mose Müller
15cf0bd414 adapting components to new callback function 2024-03-27 15:20:23 +01:00
Mose Müller
ff3a509132 passing fullAccessPath instead of parentPath and name 2024-03-27 15:20:23 +01:00
Mose Müller
ceed62c8f2 merges NumberInputField back into NumberComponent 2024-02-21 15:46:27 +01:00
Mose Müller
2d98ba51f4 moves displayName and id to GenericComponent and pass them as props 2024-02-21 15:45:37 +01:00
Mose Müller
fffe679bf0 defines changeCallback function in GenericComponent and passes it to components (instead of setAttribute)
The components do not use the setAttribute method themselves anymore. This way, you can provide
the changeCallback function if you want and thus reuse the components.
2024-02-21 08:32:59 +01:00
Mose Müller
2bb02a5558 separating out NumberInputField from NumberComponent (to be used in MethodComponent) 2024-02-20 17:20:20 +01:00
Mose Müller
7ef82e61e5 frontend styling 2024-02-01 13:33:22 +01:00
Mose Müller
0ecaeac3fb replaces js interfaces with types 2024-01-16 12:57:35 +01:00
Mose Müller
0e9832e2f1 updates DocStringComponent placement 2024-01-16 12:55:18 +01:00
Mose Müller
9d90fd2b81 displayName of components is now taken from WebSettingsContext 2023-12-21 10:30:21 +01:00
Mose Müller
8e3a1694ce updates frontend components to not have DataService in the fullAccessPath 2023-12-21 10:03:17 +01:00
Mose Müller
e643dd6f5c adds number object types to NumberComponent 2023-12-13 10:34:32 +01:00
Mose Müller
dc4c9ff58f removes unused customEmitUpdate prop from NumberComponent 2023-12-11 17:30:12 +01:00
Mose Müller
aab2b4ee77 updates frontend reducer to accept new sio_callback event data 2023-12-05 10:49:33 +01:00
Mose Müller
613b1dd6a4 updates addNotification type hints in components 2023-11-27 15:41:30 +01:00
Mose Müller
3cc6399f60 frontend: update style (fix button appearance) 2023-11-09 17:10:21 +01:00
Mose Müller
d18be54284 updates frontend components to use new methods from socket.ts 2023-11-09 13:52:23 +01:00
Mose Müller
8ae0b7818b feat (frontend): pressing "-" at the beginning of a number component will add a minus sign 2023-10-30 14:36:52 +01:00
Mose Müller
1d2325171b fixing eslint errors 2023-10-30 14:14:32 +01:00
Mose Müller
b149c1b411 fix: component ids adhere to html guidelines now 2023-10-30 14:05:39 +01:00
Mose Müller
7dcec88c9a frontend: updating addNotification type hints 2023-10-30 13:26:25 +01:00
Mose Müller
5ad15c1cae frontend: fix div ids 2023-10-17 11:45:50 +02:00
Mose Müller
23ef229eb1 frontend: removes unused import 2023-09-14 10:29:23 +02:00
Mose Müller
ee124ead89 removes buttons from number components 2023-09-14 10:17:25 +02:00
Mose Müller
bbee77e231 feat: adds simple functionality to buttons in number component 2023-09-14 10:12:51 +02:00
Mose Müller
050a718e44 feat: highlighted digits are overwritten in number components 2023-09-14 08:28:38 +02:00
Mose Müller
f7579c3a89 feat: components implement their notifications now
- removing nestedObjectUtils and useNotification hook
- passing addNotification method to all components
- components can use the addNotification method to create their
  notifications
2023-08-10 15:07:49 +02:00
Mose Müller
8205e4d463 chore: changing parent_path to parentPath 2023-08-10 14:24:30 +02:00
Mose Müller
2951a73883 frontend: styling other components 2023-08-08 16:39:29 +02:00
Mose Müller
32ecc9520f feat: adding NumberComponent to SliderComponent 2023-08-08 15:52:31 +02:00
Mose Müller
eed309590e feat: adding support for units
With `pint` as the unit package, the user can now define Quantities as
attributes of their DataService class. This will be rendered as a float
in the frontend application with the unit as an additional field
appended to the form.
2023-08-07 14:05:48 +02:00
Mose Müller
5400067c18 feat: updating frontend styling
- forms will have red background colour when "instant  update" is enabled
- button styling is in css file now
2023-08-02 12:06:23 +02:00
Mose Müller
7a89168d14 fix: "instant update" feature
- Components do update to values received from backend even if instant
  update is not selected.
2023-08-02 12:06:22 +02:00
Mose Müller
5cb30688cf feat: adding instant_update switch 2023-08-02 12:06:22 +02:00
Mose Müller
c5bbaad58d fix: NumberComponent cursor position change 2023-08-02 12:06:22 +02:00
Mose Müller
b385d728fc fix: do not prevent Tab behaviour in NumericComponent 2023-08-02 12:06:22 +02:00
Mose Müller
42bfa028e0 fixing NumberComponent rendering 2023-08-02 12:06:21 +02:00
Mose Müller
3e925c7087 frontend: only display "render count" when in development mode 2023-08-02 12:06:21 +02:00