workflowproducts / envelope

Publish web apps based on your PostgreSQL database fast!
https://workflowproducts.com/envelope.html
Apache License 2.0
53 stars 2 forks source link

Collected notes/issues #3 #161

Closed michaeltocci closed 1 year ago

michaeltocci commented 1 year ago

Page Curl. Page curl needs general update. Scrolling is weird. Would be helpful to add code to search the page for template[for="page-curl"] on load and add it to the bottom of the page curl if it's there.

Gs-memo. Firefox does not interpret the rows attribute correctly. Setting the gs-memo height to initial seems to help.

Templating engine. Would be helpful to build intelligent error checking. Right now, if there's a syntax error, the error message isn't useful.

Templating engine. Allow templating to have conditionals around attributes. Right now, this is disrupted by the code that adds the "value" attribute (value="{{! row.COLUMNNAME }}") if there's a "column" attribute. It does this by parsing the DOM and using selectors/setattribute to get the work done. By parsing the DOM, the browser destroys the templating around attributes. So, we need to update to a text-only way of generating the "value" attributes. Here's an example of an template that would break: <gs-button {{? row.id === 5 }} data-conditionally-applied-attribute="test" {{?}}>test</gs-button>

Gs-table. After update, we're losing cursor positioning. Make sure to refocus correct control and to reset cursor position.

Gs-date. Right now, gs-date is very slow. If we have a bunch of them in one form-custom control, it slows down display significantly. To test, try having a form, or form-custom load with 5 date columns and about 200-300 records.

crosstocci commented 1 year ago

Page Curl: I have implemented id="page-curl". "id" rather than "for" is more consistent with how templates are handled in the gs-dialog. I have also fixed the scrollbar appearing. It will resize for however many buttons you add.

GS-MEMO: This has been a bug in firefox for 23 Years. https://bugzilla.mozilla.org/show_bug.cgi?id=33654. I was able to work around it by setting height: inherit; on the textarea. This seems to work fine on edge and firefox.

GS-DATE: I was unable to find what about the element makes it so slow. I spent an hour poking through optimizing and commenting out sections but couldn't improve speed at all. I'm guessing that having around 2000 elements on the screen is not very fast. Maybe try the gs-table.

crosstocci commented 1 year ago

GS-TABLE: This has already been fixed. If there is a specific situation where it doesn't refocus please report it with details.

Templating engine: I leave the errors to Michael as he will be making a new version of the templating code.

As far as templating attributes: This has to do with the fact that any element (including the commented ones inside gs-data) eventually (if not immediately) will get parsed by the browser. This adds in a bunch of ="" to anything the browser thinks is a lonesome attribute, which breaks the template parsing. So even testing on elements without value or column attributes, it won't work.

GS-DATE: Some more testing revealed that the internal elements were slowing it down drastically. I began to add the normal "defer-insert " code, and tested a few different levels of it. With 2000 gs-dates load times were: Input and Button: Twenty Seconds Input: Two Seconds Text node: Two Seconds

Since changing between a text node and input complicates the element significantly, and the load times for 2000 were the same, I decided to make defer-insert only remove the button. It will add the button on hover or focus, and remove it when unfocused and unhovered.