Closed ilyatitovich closed 6 months ago
I didn’t find
, maybe I understood something wrong
Package size limit has exceeded by 1.34 kB
Increase size limit with 5 KB step
Test gives an error: TypeError [Error]: request is not a function. I haven't figured out why yet.
You need to mock the request like in https://github.com/hplush/slowreader/blob/main/core/test/preview.test.ts
mockRequest()
in beforeEach
checkAndRemoveRequestMock()
in afterEach
expectRequest
with expected URLs in the testWe can add some simpler mock if needed.
setBaseTestRoute({ params: { url: 'dev.to/feed' }, route: 'add' }) await setTimeout(100) strictEqual(side.get(), 'second')
How user will select feed if we switch to the second step? The feed adding process:
Maybe route-based logic is not enough for all two-step logic. We can export some methods from two-steps to use in preview
and similar pages when steps are separated by internal state, not route.
Thanks! Now process to add feed is clearer. I'll add some function to check this steps.
Removed URL patterns from the core
code and updated logic.
core/router.ts
showSecondStep()
moved to setPreviewCandidate()
Esc
key now clicking on Back
buttonbackRoute
codeEsc
hotkeyThanks!
Fixes #95
Done:
Back
button toEsc
key support for switching between sidesTest gives an error:
TypeError [Error]: request is not a function
. I haven't figured out why yet.In Progress:
<TwoSidePage>
, maybe I understood something wrong 😀Motivation
These changes will improve the user experience on mobile devices.
Checklist
pnpm test
.scripts/
, add a comment with a description.README.md
.README.md
.core/
. What code will also be useful on other platforms?pnpm size
and check the difference in the JS bundle size. Is it relevant to the changes? Change the limit inweb/.size-limit.json
if necessary.web/main/
files:web/public/404.html
orweb/public/500.html
?index.html
.core/
: