downforacross / downforacross.com

Web frontend for downforacross.com -- continuation of stevenhao/crosswordsio
https://downforacrosscom.downforacross1.now.sh
MIT License
220 stars 92 forks source link

feat: improve markup support #302

Closed brownie-in-motion closed 5 months ago

brownie-in-motion commented 5 months ago

re-implementation of components/Player/ClueText.js that

  1. parses HTML in clues in a more robust way and
  2. allows additional markup to be easily supported.

additionally, this automatically handles HTML entities, removing the need for textarea hacks

example puzzle for testing: markup-test.zip

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
downforacross.com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 7, 2024 9:30pm
brownie-in-motion commented 5 months ago

(fixes #301)

zhiyi-zhang-duke commented 5 months ago

Can we get some screenshots of the code in action for some of the allowed html elements? I'm curious what they look like. I was going to checkout your branch myself but figured it might be easier for everyone involved if we can see it from your local machine.

brownie-in-motion commented 5 months ago

Sure, here is what the example puzzle I uploaded looks like with the changes (left) compared to the current version (right) image

zhiyi-zhang-duke commented 5 months ago

Thanks, the screenshots really help! @stevenhao would you rather try deploying this feature with a feature flag? https://posthog.com/tutorials/react-feature-flags

We could keep the old component and perhaps rename it to LegacyClueText. Then we can conditionally render the new component based on some criteria (only New York Times puzzles or something). Just a suggestion if you're hesitant to release this fully.

stevenhao commented 5 months ago

hey sorry for dropping this. reviewed again & i think it's probably not going to be a security risk! thanks for your patience :)