more htmx
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# Manual Testing for Toggle Issues
|
||||
|
||||
## Issue 1: Scroll Jumping to Top
|
||||
|
||||
### Test Steps:
|
||||
1. Open http://localhost:1999/?lang=en
|
||||
2. Scroll down 500px (or just scroll down a bit)
|
||||
3. Click any toggle (Theme, Length, or Logos)
|
||||
4. **Expected**: Scroll position stays the same
|
||||
5. **Actual**: Check if scroll jumps to top
|
||||
|
||||
### Current Status:
|
||||
- **Theme toggle**: Uses hyperscript (no HTMX), should not scroll but may have issue with label click
|
||||
- **Length toggle**: Uses HTMX, scroll preservation implemented in main.js
|
||||
- **Logo toggle**: Uses HTMX, scroll preservation implemented in main.js
|
||||
|
||||
## Issue 2: Logo Toggle Not Syncing
|
||||
|
||||
### Test Steps:
|
||||
1. Open http://localhost:1999/?lang=en in desktop view (>900px)
|
||||
2. Note the current state of **desktop** logo toggle (on/off)
|
||||
3. Resize window to mobile (<900px)
|
||||
4. Open hamburger menu
|
||||
5. Click **mobile** logo toggle
|
||||
6. Wait for HTMX to complete
|
||||
7. Close menu and resize back to desktop
|
||||
8. **Expected**: Desktop logo toggle matches the mobile toggle state
|
||||
9. **Actual**: Check if desktop toggle updated
|
||||
|
||||
### Debug:
|
||||
- Open browser console
|
||||
- Look for: `Toggle sync - Logos: desktop=true/false, mobile=true/false`
|
||||
- This will show if the sync code is running
|
||||
|
||||
## Quick Test Commands:
|
||||
|
||||
### Check if server is running:
|
||||
```bash
|
||||
curl -s 'http://localhost:1999/?lang=en' | grep -o 'id="themeToggle"' | head -1
|
||||
```
|
||||
|
||||
### Check scroll preservation code:
|
||||
```bash
|
||||
curl -s 'http://localhost:1999/?lang=en' | grep -A 5 'savedScrollPosition'
|
||||
```
|
||||
|
||||
### Check toggle sync code:
|
||||
```bash
|
||||
curl -s 'http://localhost:1999/?lang=en' | grep -A 3 'Toggle sync'
|
||||
```
|
||||
|
||||
## Expected Console Output:
|
||||
|
||||
When toggling logos, you should see:
|
||||
```
|
||||
Toggle sync - Logos: desktop=true, mobile=true
|
||||
```
|
||||
|
||||
When toggling length, you should see:
|
||||
```
|
||||
Toggle sync - Length: desktop=true, mobile=true
|
||||
```
|
||||
Reference in New Issue
Block a user