Skip to content

Conversation

flef
Copy link

@flef flef commented Jun 23, 2025

Hi,

I propose a new widget, it's basically a Dropdown menu from predefined list of choices, as the existing one but with autocomplete.

The list is not limited to 100 items.

Regards,
Florian.

@georgweiss
Copy link
Collaborator

@flef , not entirely clear to me how this is supposed to work.
I guess the idea is to write a PV value selected from either of the items in the dropdown, and I suppose the items can be populated from some other (enum?) PV. How does one specify items if not pulled from a PV?

@flef
Copy link
Author

flef commented Jun 23, 2025

Yes, the predefined values to write into the PV are hard-coded into the widget, similar to a dropdown menu. I do not need to dynamically populate the possible values from another PV. This widget functions like a dropdown menu but is not limited to 100 predefined values. Therefore, an auto-complete feature is needed to find the correct predefined value among a large set of possibilities.

Choices :
Choice
Auto-complete and filtering :
Filetering

@georgweiss
Copy link
Collaborator

But how are the choices set in the widget editor?

@flef
Copy link
Author

flef commented Jun 23, 2025

The choices are set from the properties panel. (See Autocomplete Item)
Maybe I can rename the property by "Items", as for the dropdown widget.

prop

@georgweiss
Copy link
Collaborator

georgweiss commented Jun 24, 2025

I have a usability concern:
If I type a (string) value not present in suggestion list and press <ENTER>, the value is written to the PV. If on the other hand I type a value that is present in the list, pressing <ENTER> will not write the value. Instead I need to select form the dropdown to trigger a write operation.

This raises the question: should values other than those offered in the list be accepted?

It would also be of value to add an example (or extend existing) in the app/display/model/src/main/resources/examples folder.

@flef
Copy link
Author

flef commented Jun 24, 2025

I have a usability concern: If I type a (string) value not present in suggestion list and press , the value is written to the PV. If on the other hand I type a value that is present in the list, pressing will not write the value. Instead I need to select form the dropdown to trigger a write operation.

This raises the question: should values other than those offered in the list be accepted?

It would also be of value to add an example (or extend existing) in the app/display/model/src/main/resources/examples folder.

Yes, actually, we want to allow the user to add custom input. This works more like a suggestion list rather than a real constraint. However, it may be interesting to add a property to forbid users from typing a string that is not in the suggestion list.

@flef
Copy link
Author

flef commented Jun 24, 2025

I'll push example.

@georgweiss
Copy link
Collaborator

Thanks, but I still find it a bit confusing that pressing the <ENTER> key when typing a value present in the list does not write to PV.

@flef flef marked this pull request as draft June 24, 2025 15:02
@georgweiss
Copy link
Collaborator

@flef, we feel there is overlap between this widget and existing widgets. Consequently we would like to discuss use case and details in next developer meeting. If you send me your email address (to [email protected]) I will make sure to invite you.

@flef flef force-pushed the feature/widget-autocomplete branch from c16b452 to cc9db89 Compare July 29, 2025 13:08
@flef
Copy link
Author

flef commented Jul 29, 2025

Hi,

I have significantly improved the initial version.

  • The PV is only written when pressing the key (as for a TextEntry) or when a suggestion is selected
  • Possibility to allow or disallow values outside the list of suggestions (via an option)
  • Different search algorithms (startswith, fuzzy, contains)
  • A more comprehensive example page detailing all the options

As a reminder, the purpose of this widget is to offer a list of suggestions based on what the user types. It works like a "Text Entry" for entering PVs (validation using the Enter key). This widget is a complement to the "ComboBox". In addition, it allows the management of a large number of suggestions (whereas ComboBox is limited to 100). In our case, we sometimes have up to 10,000 possible values listed.

Example with 100,000 suggestions:
{11472035-48B9-479A-A0BD-C3DDDFB25077}

It could eventually replace the ComboBox, as all of its features are available in this new widget.

Here's the demo page from Home menu :
image

Regards,
Florian

@flef flef requested a review from kasemir July 29, 2025 13:13
@flef flef marked this pull request as ready for review July 29, 2025 13:20
@shroffk
Copy link
Member

shroffk commented Jul 29, 2025

Thanks florian
Do you think you will be able to attend the developers meeting on the 14th. We had a few questions about your work and its potential to replace/augment text update and combobox

@kasemir
Copy link
Collaborator

kasemir commented Jul 29, 2025

It could eventually replace the ComboBox

I like that idea! What are the remaining differences?

Combo: Enter list of "Items" or select "Items from PV"

New widget: "Autocomplete Item" contains "Option1\nOption2\nOption3"

The combo approach seems better for the typical use cases: Get options from PV, fall back to a handful of "Items".
It doesn't scale to 10,000 possible values. There, one long "Autocomplete Item" string, or even an external file seems better.

@flef
Copy link
Author

flef commented Jul 29, 2025

Sure.

We also have a much larger topic that we want to integrate. We have made significant progress on supporting our database InfluxDB.

InfluxDB is an open-source time series database designed to efficiently store and query large volumes of time-stamped data, such as monitoring metrics, events, and real-time analytics. It is optimized for high write and query performance, making it a popular choice for industrial applications and data monitoring solutions.

In another related branch, we have also integrated ChartFx from fair-acc, as we have already discussed in this thread.

We will share this work here as soon as we have been able to test the solution on our installations to a minimum extent.

@kasemir
Copy link
Collaborator

kasemir commented Jul 29, 2025

As for InfluxDB, we had been working on support for that, see presentation under http://www.rri.kyoto-u.ac.jp/EPICS/program.html

It was faster than an RDB, but we eventually decided to not use it because

  • It's implemented in go, a somewhat uncommon language

  • The data is transferred in JSON, and the actual implementation resulted in lost detail for small/large floating point values, which was a problem for our vacuum readings which are something like "1e-20" which turned into "0". Reported, Incorrect long values returned due to json to java conversion influxdata/influxdb-java#276, but closed as “wont-fix” which was at the time quite frustrating.

  • While influx supports auto-aggregation, for example replacing older samples with the 1-hour-average to reduce the data size, how it does that exactly by storing the data under a different name wasn't convenient. The data retrieval would basically need to look in several different places: Is there recent data? Is there data reduced to the 1 hour avg? Is there data reduced to the daily avg?

  • Compared to RDB systems with a track record of having been available for decades and keeping data for that long, influx is still quite new. Cool for system logs or your Arduino fishtank controller data from last month. But control system data going back to 2006??

Also, the two options we have are pretty good: RDB for those who prefer generality, Archive Appliance for those who prefer something optimized for control system data.

@flef
Copy link
Author

flef commented Jul 29, 2025

Thank you for the information, I am interested in the branch that supports InfluxDB. I wasn’t aware of this rounding issue. That is indeed unfortunate. I will check if this bug is still present in InfluxDB versions 2 and 3.
I think it might be interesting for me to present our usage context, as I feel that our use case is a bit different. On our side, we collect telemetry data at relatively high frequency (more than 5,000 values at over 250 Hz) over relatively short periods (from 1 hour to a maximum of 2 days).

@flef
Copy link
Author

flef commented Jul 29, 2025

Thank you for the information, I am interested in the branch that supports InfluxDB. I wasn’t aware of this rounding issue. That is indeed unfortunate. I will check if this bug is still present in InfluxDB versions 2 and 3. I think it might be interesting for me to present our usage context, as I feel that our use case is a bit different. On our side, we collect telemetry data at relatively high frequency (more than 5,000 values at over 250 Hz) over relatively short periods (from 1 hour to a maximum of 2 days).

I confirm that the rounding issue originates from the Java client and not from the database itself, at least in InfluxDB 2.x. The value is correctly stored into DB.

@kasemir
Copy link
Collaborator

kasemir commented Jul 29, 2025

we collect telemetry data at relatively high frequency .. over relatively short periods

That might be a very good fit for influx.

rounding issue .. not from the database itself

Good. Worst case, you could use a patched java client lib

@flef
Copy link
Author

flef commented Aug 14, 2025

@kasemir @georgweiss , can one of you send me an invitation for the meeting please ?

@georgweiss
Copy link
Collaborator

georgweiss commented Aug 14, 2025 via email

@flef flef closed this Sep 10, 2025
@flef flef deleted the feature/widget-autocomplete branch September 10, 2025 12:35
@flef flef restored the feature/widget-autocomplete branch September 10, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants