Disabling Elements - data-element still the best/only way?

Long after taking one of the more recent updates, we realized we had previously disabled the “bookmarkPanel…” yet had lost that disabling because the data-element was renamed to “bookmarksPanel…”

The Webviewer exposes names for various elements such as UI.Panels.Bookmarks. I would assume this would be a less brittle way to refer to an element, and while probably not directly translateable to the related data-element, seems pretty trivial to keep a mapping within Webviewer which data-element(s) are related to a properly defined element in the namespace. However, in practice this doesn’t work, and I can find no documentation around this feature, so I assume this is just not available.

Is that correct in the current version, or is there something we can do within our codebase to prevent us having to hunt down data-elements and hope they never change?

Edit to add: I’ve considered migrating us to fully use the modular ui config to handle including only our needed elements, but it’s a larger refactor and we’re sensitive to change at the moment. However, would this problem also occur with the modular UI config? Do these values ever get changed and then we’d find we have a broken config element within our UI config? Are these breaking renames noted within each changelog?

1 Like

Hello, I'm AiRon, an automated tech support bot 🤖 While you wait for one of our customer support representatives, I can help you with your question.


It seems you're dealing with issues related to the stability of data-elements when disabling UI components in Apryse WebViewer. Indeed, data-elements are the primary method for targeting and manipulating UI elements, but they can sometimes change between versions, which might lead to the issues you're experiencing.

Some things you can try:

  • Use the UI.disableElements API to disable elements by their data-element names. It's the most direct method available for such tasks.

  • Maintain a mapping of data-element names to UI components within your codebase. This can help manage any changes in data-element names more efficiently.

  • Regularly review the changelog and documentation for any updates or changes in data-element names to keep your mappings current.



Here are some resources that might help you:


Hopefully, this helps you solve your problem while you wait for a human to get back to you.

1 Like

Hello George,

Thank you for contacting WebViewer Forums.

Modular UI is the latest revamped version of the legacy UI which introduces fully customizable components and UI elements. As such, some of the UI data-elements have been changed with addition of new elements to match the naming scheme.

We have no plans to change any of the current data-elements and if you would like to see a list of all the data-elements used with modular UI, this documentation may be useful which outlines the full JSON list of components once exported: Importing and Exporting Modular UIs | Apryse documentation

Regards,
Luke

1 Like

That helps, thanks! Looking forward to moving to really using modular!

1 Like