refactor: page.text.vue to use composition api #25

Manually merged
Johann150 merged 4 commits from :refactor/page.text.vue into main 2022-07-25 05:52:33 +00:00
Owner
No description provided.
norm added 1 commit 2022-07-23 21:42:18 +00:00
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
d79fe1dee0
refactor: page.text.vue to use composition api
norm added 1 commit 2022-07-23 21:51:58 +00:00
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
d6a5eb4666
Add padding
This will let not have text right up against the edge.
norm added 1 commit 2022-07-23 21:57:07 +00:00
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
ebfe2162e9
only add padding for left and right sides
Johann150 reviewed 2022-07-24 09:38:07 +00:00
@ -51,0 +19,4 @@
const MkUrlPreview = defineAsyncComponent(() => import('@/components/url-preview.vue'));
let text: string = $ref(props.hpml.interpolate(props.block.text) ?? '');
Owner

To reduce code duplication maybe its better to make an empty string ref here and add immediate: true to the watch options (after line 35).

To reduce code duplication maybe its better to make an empty string ref here and add `immediate: true` to the watch options (after line 35).
norm marked this conversation as resolved
@ -51,0 +30,4 @@
});
watch(props.hpml.vars, () => {
text = props.hpml.interpolate(props.block.text) ?? '';
Owner

What was the reason to add ?? '' here? The only way I see that that function could return something that is not a string is when you pass in null, which isnt allowed by the TextBlock type.

What was the reason to add `?? ''` here? The only way I see that that function could return something that is not a string is when you pass in `null`, which isnt allowed by the `TextBlock` type.
norm marked this conversation as resolved
norm added 1 commit 2022-07-24 15:58:24 +00:00
ci/woodpecker/pr/lint-backend Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/lint-client Pipeline failed Details
ci/woodpecker/pr/test Pipeline failed Details
6ffbabeedc
use immediate: true for watch
Johann150 manually merged commit 6d3181f983 into main 2022-07-25 05:52:33 +00:00
norm deleted branch refactor/page.text.vue 2022-07-27 21:21:10 +00:00
Sign in to join this conversation.
No reviewers
No Label
feature
fix
upkeep
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: FoundKeyGang/FoundKey#25
No description provided.