Skip to content

Conversation

@sarahboyce
Copy link
Contributor

Fixes #2349

I also added playwright to have a way to test JavaScript (might be controversial and can remove if wanted)

@sarahboyce sarahboyce force-pushed the fix-search-hot-key-desktop branch 2 times, most recently from 549b303 to 9d9dbf6 Compare November 24, 2025 13:46
@sarahboyce sarahboyce requested a review from a team November 24, 2025 14:20
Copy link
Member

@adamzap adamzap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still catching up on recent PRs...it looks like we have two elements with the same ID on the page now. I wonder if there's a way to achieve the same behavior with a single element and responsive styling. Do you or others think this is worth pursuing?

@sarahboyce
Copy link
Contributor Author

I wonder if there's a way to achieve the same behavior with a single element and responsive styling. Do you or others think this is worth pursuing?

I originally tried doing this but found it challenging. The search bar duplication aligns with the light/dark mode toggle duplication and show/hide behavior, aligning to that was easier to acheive given the existing html structure

@sarahboyce sarahboyce force-pushed the fix-search-hot-key-desktop branch 3 times, most recently from 7e511ca to b458667 Compare November 25, 2025 14:48
@SaptakS SaptakS requested a review from adamzap November 26, 2025 19:42
self.assertTrue(is_focused)
page.close()

def test_search_ctrl_k_hotkey_mobile(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to set an explicit user agent on the two hotkey tests. I'm getting failures because I'm running them locally on a Mac.

STATIC = djangoproject/static

ci: compilemessages test
ci: compilemessages collectstatics test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed because of the new JavaScript tests?

Copy link
Contributor Author

@sarahboyce sarahboyce Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes 👍
(I think this also mostly fixes #1831 but still need the tests to use the production STORAGES setting, can have someone check if that can be pulled into the common settings file 🤔)

@sarahboyce sarahboyce force-pushed the fix-search-hot-key-desktop branch from 9293dd0 to c59d0cd Compare November 27, 2025 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hotkey for focus-on-search broken

3 participants