action #156055
closedcoordination #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
0%
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
Updated by okurz 9 months ago
- 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
Updated by livdywan 4 months ago
- 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
Updated by robert.richardson 4 months ago
- Status changed from Workable to In Progress
- Assignee set to robert.richardson
Updated by openqa_review 3 months ago
- Due date set to 2024-09-20
Setting due date based on mean cycle time of SUSE QE Tools
Updated by robert.richardson 3 months ago
Related PR: https://github.com/os-autoinst/openQA/pull/5913 (WIP)
Updated by robert.richardson 3 months ago
- 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.
Updated by robert.richardson 3 months ago
- 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.