fix options
- Fix base URL; simplify UX.
- Improve Safe Mode error display.
Deploying json-ld-org with
Cloudflare Pages
| Latest commit: |
3750831
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0aa4e3ed.json-ld-org.pages.dev |
| Branch Preview URL: | https://fix-options.json-ld-org.pages.dev |
Fixes several more items from #896
- Safe mode seems to totally not work now. No errors at all, seems to eat them and not update output or log anything.
- I don't understand the reasoning for the changes here. Seems the behavior is changing rather than fixing what was working before. I know the way it worked was a bit odd, but it was intentional. (And the implementation was awkward mostly because of the old jquery static mess.) The "default" option modes were meant to default to whatever the algorithms would do. Looks like now it's forcing you to choose an option value. How is that going to work to let people see what default behavior is?
Clicking more, I see safe mode maybe only works on the compact tab? But not elsewhere? In particular, not at all on the canonized tab.
Clicking more, I see safe mode maybe only works on the compact tab? But not elsewhere? In particular, not at all on the canonized tab.
Hey, sorry. I was too narrowly focusing my changes... I've fixed that and canonize not having safe mode forced on.
Speaking of which...is there a reason the developer / code has to force safe mode on for canonize? Can it be used without safe mode on? And if so...why are we secretly turning it on here?
- How is that going to work to let people see what default behavior is?
I guess there is some risk here if the defaults change since they're being "matched" in the UX code rather than just not passing them in. Would calling out which one is the default help? Also, are these defaults unique to jsonld.js?
I have a longer term goal (now) to incorporate other libraries (Sophia via SoWASM and ldtr at least).
I want to be sure what the UX's defaults are clear...more than I care what the underlying libraries defaults are...if that makes sense.
Speaking of which...is there a reason the developer / code has to force safe mode on for
canonize? Can it be used without safe mode on? And if so...why are we secretly turning it on here?
I'm confused by the words there. To be clear, the way the playground safe mode feature was designed to work was that it was off by default for the regular API calls, because that's not part of the spec, and the theory was the UI should match that behavior. It was on by default for the canonize call, because that's how it was decided jsonld.js would work. The UI option to force safe mode on or off would override those default behaviors.
I've always thought the UI was confusing, but the playground code was too hard to work on to fix it. Perhaps there should be a UI indicator to show the current mode depending on the algorithm and options currently selected.
I did hope some of the playground updates could mostly match previous behavior as a first update step. Then work on these sorts of design decisions next.