action #156055
closed
coordination #154768: [saga][epic][ux] State-of-art user experience for openQA
coordination #154771: [epic] Improved test developer user experience
[research][timeboxed:20h] Evaluate if https://htmx.org/ can simplify and reduce what we have defined as procedural javascript code, jquery leftovers, etc. size:M
Added by okurz 10 months ago.
Updated 3 months ago.
Category:
Feature requests
Description
Motivation¶
Use less jquery, less outdated, insecure old cruft, more clean code, etc.
Suggestions¶
- Maybe we can not use htmx everywhere but on special pages where we could replace an existing outdated solution that is simple enough or it allows us to add new features where we don't have anything related yet
- Do a little intro for the whole team about HTMX specific to what we do
Related issues
1 (1 open — 0 closed)
- Private changed from Yes to No
- Parent task set to #154771
- Target version changed from Tools - Next to Ready
- Subject changed from [research][timeboxed:20h] Evaluate if https://htmx.org/ can simplify and reduce what we have defined as procedural javascript code, jquery leftovers, etc. to [research][timeboxed:20h] Evaluate if https://htmx.org/ can simplify and reduce what we have defined as procedural javascript code, jquery leftovers, etc. size:M
- Description updated (diff)
- Status changed from New to Workable
- Target version changed from Ready to Tools - Next
- Target version changed from Tools - Next to Ready
- Target version changed from Ready to Tools - Next
- Target version changed from Tools - Next to Ready
- Related to action #156340: Evaluate the use of state-of-the-art web development frameworks to simplify our stack, e.g. alpine.js, vanilla CSS nesting size:S added
- Status changed from Workable to In Progress
- Assignee set to robert.richardson
- Due date set to 2024-09-20
Setting due date based on mean cycle time of SUSE QE Tools
- Status changed from In Progress to Resolved
We'll discuss this in the team on monday after the daily. Although my work on the ticket was partially blocked by #166805 i think i can at least give an overview and show some of the problems i had.
- Status changed from Resolved to Feedback
Please only resolve the ticket with at e least one sentence which is actually about htmx so that we have a future reference to know which path to follow
- Due date changed from 2024-09-20 to 2024-09-27
- Status changed from Feedback to Resolved
We had a short talk after the daily today and decided not to go further with the implementation of HTMX for now.
Summary:
CSRF Token Handling:
HTMX does not automatically include the CSRF token in the request headers, which is essential for preventing cross-site request forgery attacks.
Incorporating the CSRF token would require adding an event listener using htmx:configRequest, introducing additional complexity to the codebase.
Selenium Test Compatibility:
The hx-confirm attribute in HTMX utilizes window.confirm() for confirmation dialogs.
In our Selenium tests, window.confirm() does not trigger a native alert dialog that Selenium can interact with, causing tests to fail.
Example error message:
`getAlertText: no such alert at ... OpenQA/SeleniumTest.pm line 81.`
To resolve this, we would need to replace hx-confirm with an onclick handler using the standard confirm() function, which diminishes the advantage of using HTMX. Alternatively we would need to adjust all tests to instead check the correct DOM elements.
Given these challenges, we decided against adopting HTMX for OpenQA at this time.
- Due date deleted (
2024-09-27)
Also available in: Atom
PDF