Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Allow any .htm(l)(.gz) to be viewed as webpage #1143

Open
woutervddn opened this issue Feb 22, 2024 · 1 comment
Open

Feature: Allow any .htm(l)(.gz) to be viewed as webpage #1143

woutervddn opened this issue Feb 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@woutervddn
Copy link

woutervddn commented Feb 22, 2024

Machine Context

I'm automating my tablesaw, basically it has 3 motors: fence, angle and sawblade height.

The interesting thing here is that the useful blade height is dependent on the angle.

So for this machine, the interface that makes most sense is one that only shows the relevant input parameters for the user and calculates the correct motor positions from there.

I made an example interface in 20 minutes that can also automatically subtract blade width or any other form of math in the input field. Or if you enter an angle that is below 44° that it knows that you actually want the compound angle (since the blade only goes from 92° to 44°)

I've got a video of the (demo) interface in question:

WhatsApp.Video.2024-02-22.at.14.18.48.mp4

Feature Description

Allowing for multiple html pages to be viewed greatly reduces the barrier for machines to have specific interfaces. Only the needed buttons or elements would be available and the rest would be hidden.

Currently the tablet page is in a separate tab but making changes to that interface requires you to download the upstream project, understand the entire UI system, make the changes, compile and upload. Which is way harder than just having to create a webpage with basic fetch calls to the command interface.

The separate interface I built is (granted without the fetch calls being implemented) is 3.1KB

The functionality for this is also already there (in a way) as you can upload a custom 404 page which is my current workaround.

Other Approaches

A custom interface could be added to a tab in the existing index page. But that requires you to understand it all and compile for each change.

Another approach would be to just make your interface and upload that as index.html.gz. This would result in the user needing to recreate all (or a lot) of the index.html.gz functionality (like file upload etc) which seems unrealistic. Or go without that functionality, but even replacing the index.html.gz back to the old version for a configuration change or maintenance would require more hoops to jump through.

Having a separate UI for 'daily use' and the default index.html.gz for configuration+maintenance just makes more sense in that way.

How I Can Help

The change is small and I'm pretty sure that I can make it on my own, no experience writing tests though... Help in that regard and a second pair of eyes to verify what I wrote would be appreciated.

@woutervddn
Copy link
Author

Would the above WIP pull request be sufficient to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant