Is it possible to create a static view?

Hi,

I’d like to create a pdf view that doesn’t update every time I change a parameter.

Of course I could set the duration_guess to create a slow view. But then the update button appears every time a parameter is changed, telling the users that the view is no longer up to date. Which is not ideal.

The solution I’m thinking of is to set the specific params on which the update button should appear, or using hashlib or memoize to set some dependence on this view. However, I’m not sure on how to implement this in the PDFView.

any ideas?

Greets

@Tom_Nillesen welcome to the club. See these threads

I don’t know if a single editor will solve this UI issue.

1 Like

Thanks @sonomirco

Its good to see that I’m not the only one having this issue and that they are working on it as feature request.

1 Like

Hi Tom,

I’ve flagged this thread as a feature request.

I’m wondering what about the current implementation makes it not ideal for your usecase:

  • is the appearance of the update button giving the user the (false) impression of an error?
  • is the action of pressing the button evey time cumbersome for the user?
  • is the time it takes to recalculate the pdf view the problem?

You could indeed implement memoize on a function within the PDFView. This will not solve the popping up of the update button, but it should quickly refresh the view after pressing update.

Hope that helps!

hi @ymacken ,

all three points you name are the case, a red button that tells the user that the view no longer matches the params is a trigger that shouldn’t be used when the params are of no influence on the view.

thanks for the flag

Gr Tom

2 Likes

@mslootweg
This feature would help us a lot as well.
Using the new ChildEntityManager it improves the UX, however the setback is, the responsiveness. The Editor must be loaded and the webview also.

It would be much better if it would be possible to have certain views Static, so images, files, manuals, and above all static html views (Of dynamic, but they only have to be generated once when starting the app).

It would be great to have an argument to the WebView which means, only load once.

  • So Static webview, no update when navigating or changing values in the editor. (Memoize helps a bit, but it is reloaded anyway)
  • Logic is a combination of static files (images, html code etc.) and python code which generates (Builds) the .html once when the app is deployed or upgrade, but isn’t run each time the editor opens. It should only load the html str.

Agreed on this request, a key part of some of our apps is providing relevant reference documents to the end-users which are not affected by the parametrization so it would be very beneficial to have a static view so that:

  • There is reduced overhead each time a parameter is changed
  • It does not give the impression that the guidance documents are being recalculated based on user inputs.

It’s most relevant for PDF views for us!

Thanks