-
(hidden) Q5sFO_xwQ #[[(hidden) S-ygYfi0j]]
-
[[codemods]]
-
sync
-
extraction re: ((0IvtxZXeY))
-
{{[[DONE]]}} remove index.js imports & re-exports
-
{{[[DONE]]}} make codemods work on every ~~commit~~ PR
-
{{[[DONE]]}} move the `codemod.ts` commit before the 1st transform, split into needed & move all others into separate commit
-
{{[[DONE]]}} probably amend into the transform commit -> yes
-
{{[[DONE]]}} move the separate commit up until the 2nd transform
-
{{[[DONE]]}} repeat
-
{{[[TODO]]}} when done, test each ~~commit~~ PR
-
-
{{[[DONE]]}} extract first few & last few commits into `misc` PR
-
{{[[DONE]]}} extract each transform into separate PR
-
{{[[DONE]]}} ulala - https://github.com/pipedrive/CodeshiftCommunity/pull/11 - https://github.com/pipedrive/CodeshiftCommunity/pull/12 - https://github.com/pipedrive/CodeshiftCommunity/pull/13 - https://github.com/pipedrive/CodeshiftCommunity/pull/14 - https://github.com/pipedrive/CodeshiftCommunity/pull/15 - (draft) https://github.com/pipedrive/CodeshiftCommunity/pull/16 how to review: - https://github.com/pipedrive/CodeshiftCommunity/pull/9 :glhf: :ez:
-
{{[[TODO]]}} rebase properly, so that we can merge into upstream
-
{{[[TODO]]}} upload vid
-
-
-
(hidden) DtyJjJ4Dc [[(hidden) v8hKA88Fi]]
-
(hidden) s4IMch3oA
-
(hidden) NJ0IRqPi-
-
also i mentioned the exported codemods page via [[roam-traverse-graph]] -- whole point is that there's more transparency of what i'm doing, and i wanted it to be available earlier but only managed to create the mvp of the [[export-html-pages]] plugin this weekend. will be useful for later missions though.
-
also showed the power of #roam . He first asked if I've used #[[(hidden) 7pX0uAw-4]], and ofc i have, so i told that, but quickly mentioned of why it's annoying (grouping, labeling manually etc), and highlighted how easy it is to do things in roam hehe. i think he'll easily join:D
-
also saw him using the git plush alias for pushing - pretty sure that's the one i showed recently, mine being git pp - for pushing w/ automatically setting the upstream tracking (needed when pushing a branch for the first time), ah, awesome to see
-
-
(hidden) A563ziasr
-
-
(hidden) KXICI0qTQ
-
(hidden) -K3_AUWiI [[(hidden) YBB858w4z]]
-
[[git-rebase]] [[how to]] [[how to git-rebase]]
-
1. check which branch you're on:
-
2. this shouldn't be necessary, but just in case, let's pull the latest changes of your own branch:
-
3. since we want to rebase on top of the latest changes of master, we need to update our local git repo first:
-
4. if all goes well, we can start the procedure
-
5. ideally, there are no conflicts, the rebase completes successfully and you can move on to the [next step](((q8jggl2cV))).
-
but if often does not.
-
you can always use `git status` to see what's going on
-
in case you encounter conflicts:
-
you need to manually resolve them, and then mark them as fixed with `git add <filename>`
-
if you forgot which changes are yours, you can always find the commit by doing `git log <branch-name-you-are-rebasing>`, finding the commit, and then doing `git show <commit>`.
-
when all conflicts are fixed and added, you can continue the rebase with `git rebase --continue`
-
-
there are some edge cases as well
-
e.g. if you resolved conflicts and your commit ends up being empty, you'll need to manually commit it with `git commit --allow-empty` and then `git rebase --continue` again
-
in general, git will tell you about it - you just gotta be careful and read thoroughly. ofc, also search for info / ask for help when needed.
-
-
-
6. git should print "successfully finished rebase" or something similar.
-
if you check `git status`, it'll show that you have more commits ahead and less commits behind. makes sense, since you previously had only your commits that you started from an older commit of the master branch, but you now have all of that, plus the new commits from the master branch that you were missing.
-
-
7. you'll now need to push the new history of commits to the repo (currently it's only local).
-
8. done. check the repo & verify everything looks good.
-
9. something went wrong? yay, learning time!
-
10. good to remember:
-
rebase goes commit-by-commit (1 by 1)
-
it's easy to mess things up.
-
it's always better to do simple changes in multiple rebases, than multiple complex changes in a single rebase.
-
e.g., first you can get your changes up to date to the latest origin's master branch, and then in the 2nd rebase you can squash some commits into one parent commit, then squash some more commits into a different parent commit in a 3rd rebase, etc etc.
-
this often times helps avoid complex situations, and also helps avoid loss of partial progress - e.g. if you're rebasing and you've completed say 15 commits out of 20, but then you're on the 16th one and you f something up pretty bad, you'd have to abort. but with the abort you'll lose all of the progress and you'll have to re-do the same stuff for the 15 commits again.
-
so yeah, multiple simple rebases are better than fewer more complicated ones.
-
-
-
-
(hidden) gZN2wBsaj
-
-
(hidden) 2YkKejhmI
-
-
(hidden) pTO2pCW2N
-
(hidden) D0ZOFnYTX
-
(hidden) w2f1TU6nl
-
[[roam-traverse-graph]]
-
{{[[TODO]]}} have an option for linked references - by default, public-first or private-first
-
{{[[TODO]]}} the "checked, re-generated & exported" - "checked" is not correct, because i run the checker every 1h now, but if there are 0 changes in the whole graph, it doesn't commit anything, thus the info that we __checked__ is wrong - it shouldn't include the word "checked"
-
#[[github actions]] runner setup
-
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04
-
```shell sudo apt install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev```
-
https://askubuntu.com/a/923317
-
```shell apt install firefox```
-
{{[[TODO]]}} still failing...
-
if manually copying graph:
-
-
{{[[TODO]]}} #[[(hidden) jOMmlCP4S]] for dynamic stuff - we can just upload the generated graph (w/o metadata) & add it to the same notes repo, and fetch from it if e.g. we need the sidebar!
-
#observation oh snap, just realised that even tho `Block`s & `Page`s are separated, they kinda should be one. a block has a __root__ parent, i.e. the page, but maybe the page shouldn't be separated as a different structure, and should be the same as Block, but with the `isRoot` flag set to true instead of false?
-
{{[[TODO]]}} link
-
because when you think about it, all `Block`s can be pages as well. if you have a nested path, i.e. 3rd level block, and you click on a 2nd level block, it opens it up just like a page.
-
and the difference is that there's only 1 top-level bulletpoint, and all others are inside it. a page should implicitly have that one as well - currently it's there, but implicitly, and is not visible.
-
all those explicit 1st/top-level bulletpoints are inside yet another bulletpoint - the whole graph.
-
and, well, makes me realise that you could display the graph of not only the pages, but also all the bulletpoints inside the pages, i.e. a graph in a graph, and since blocks can reference pages & other blocks as well, it'd become very clear on which parts are referencing which
-
-
another #[[(hidden) jOMmlCP4S]] - different display behavior of linked mentions, depending on whether a hashtag `#` or double square brackets `[[(hidden) G97ohL3l8]]` were create that linked reference
-
thinking about the auto-expand part.
-
since some pages are in-and-of-itself independent (though rarely if you start understanding roam deeply enough and just use daily notes for literally everything), then
-
well lets take the other scenario. often you just use linked references in the daily notes to "write inside the page", but it shows up as a linked reference (linked mention). if e.g. you used `[[]]` you could have a convention that the linked mention should be fully expanded, because it[[(hidden) G97ohL3l8]]39;s part of the whole page, and if you used the `#[[(hidden) G97ohL3l8]]` or `#[[(hidden) G97ohL3l8]][[]]`, then it[[(hidden) G97ohL3l8]]39;d only show the `Block` that has the hashtag. (& ofc you can allow expanding it, but that[[(hidden) G97ohL3l8]]39;s not the point).
-
because currently in roam, nothing is auto-expanded, and in [[roam-traverse-graph]] [[export-html-pages]], everything is. this seems like the best alternative.
-
e.g. pages like [[TODO]] / [[DONE]] would benefit from __not__ being auto-expanded, while pages like [[roam-traverse-graph]], [[codemods]], etc., would benefit from having their linked mentions expanded.
-
-
-
& yet another #[[(hidden) jOMmlCP4S]] - have a 3-column view - small left column w/ all pages, big 2nd column in middle to view the actual content of the page, & the 3rd column right sidebar, identical to the roam's one.
-
the `all pages` button sucks because it's not a link (`<a></a>`) and e.g shift-f doesn't open it in a new tab.
-
& yet another #[[(hidden) jOMmlCP4S]] - since pages are read-only (i.e. no editing), we can have cool shortcuts that normally you'd have to use w/ modifiers in #roam - e.g. that first came to mind was opening the sidebars (right or left) - using `h` or `l` to go left & right (could use multiple times, just like in i3 / vim splits or tmux panes or smthn similar - it wraps), then ofc `j` & `k` when in left sidebar to select some page, maybe same in right sidebar, idk what in the middle
-
{{[[TODO]]}} have html `id` attribute on each block to be able to link to it quickly
-
{{[[TODO]]}} instead of having the `publicTags` in [[roam-traverse-graph-settings]], we probably should have a conventional tag like #[[(hidden) tm2-dKJbJ]] which one could use to mark pages as `publicTag`s.
-
similar to how I __thought__ I used the `#public` (global) tag lol
-
better because inside the #[[(hidden) tm2-dKJbJ]] page, you see what pages will make your stuff public
-
more benefit for the page itself because it sees itself mentioned in the #[[(hidden) tm2-dKJbJ]], instead of manually checking the [[roam-traverse-graph-settings]] page.
-
tho idk, not sure yet, maybe we need a better name than #[[(hidden) tm2-dKJbJ]], to make it clear. if it is very understandable, then sure
-
-
-
WHAT #TIL #[[(hidden) DY6wPnICE]] [[typescript]] is amazing -- you can declare function overloads simply by having an object type!!!
-
```typescript export type Checker<T> = { (item: T): boolean; (item: T, otherItemWhichShouldOnlyBeUsedIfYouNeedToDirectlyCompareThem: T): number; }; ```
-
this is big -- if you created regular function overloads, you couldn't even specify the type `T`, because you'd have to cast the value into a type, and then the type `T` would be inlined!!! (i.e., would end up __after__ the quotes, not before, i.e. would infer from argument, instead of allowing the user to specify explicitly!!!)
-
the regular function overloads:
-
```typescript export declare function CheckerAutomatic<T = unknown>( item: T // ): // otherItemWhichShouldOnlyBeUsedIfYouNeedToDirectlyCompareThem: T boolean; export declare function CheckerManual<T = unknown>( A: T, // B: T ): Order | number; export type Check = typeof CheckerManual | typeof CheckerAutomatic;```
-
-
i remembered this might be a thing because i did function overloads for the [[codemods]] transform's (replace-jsx-attribute) configs' `FromToValueMap` and remember the highlight from the editor (well, ts-server) being similar to an object but i didn't realize it up until now 🤯
-
https://github.com/pipedrive/CodeshiftCommunity/blob/d8046f419a5a4e653a4b8c17606c589777b884fc/packages/reusable-transforms/src/replace-jsx-attribute/replace-jsx-attribute.config.ts#[[(hidden) WBl6TSRcS]]115-L116
-
```typescript export type FromToValueMap = { [key in ValidJsxPropertyValueAsKey]?: | ValidJsxPropertyValueAsValue | FromToValueMapModifierFn /** * otherwise, provide an array of new values. * * if array contains exactly 1 element: * will replace the value automatically; * * else, if array contains >1 element: * will replace the value with the 1st one from the array, and * will add a comment, prefixed with "TODO CODEMOD MANUAL INTERVENTION", to make the user verify themselves. */ | ArrayWithAtLeastOneElement<ValidJsxPropertyValueAsValue>; };```
-
-
-
-
update:
-
uh oh but now you cannot provide a function that will match this, ffs...
-
I guess I'll just go w/ the type union of the function instead, & will do manual type assertions in the utility fn...
-
wth, can't do that either - if using a single argument, typescript gives implicit any error, tho if both args, then all good ? wut
-
update:
-
ah the issue is that one fn returns boolean, other number. bruh
-
final update:
-
went w/ the initial solution - advanced function overload, and in typescript for both functions allowed to return either a number or a boolean, and implemented runtime typeof checks to throw errors if incorrect type returned.
-
ideally #typescript fixes this & we can use the original solution w/o having to have runtime assertions.
-
-
-
-
{{[[TODO]]}} #observation in #roam, i have 3 pages w/o a "create-time" - all from 2020 (~~they're the only pages i had from 2020 so perhaps they didn't it back then but not sure~~ wait nvm they are not the only ones lol)
-
{{[[TODO]]}} "checked" dynamic
-
{{[[TODO]]}} "re-generated & exported" - when html pages get generated, check if anything significant changed (anything except the re-generated & exported stuff) (or even use the graph file & check via page.edit-time + linked mentions' edit time & see if any updates exist), and if none exist - discard changes of that page
-
-
(hidden) hW5S23pgG
-
(hidden) joP0o_e3f
-
(hidden) vl-Cgcgdx
-
#public
-
(hidden) 3JdCApMY5
-
{{[[TODO]]}} (hidden) yOhJvUwcB [[(hidden) dEoS03QiW]] #[[(hidden) jOMmlCP4S]]
-
(hidden) Fqsx_7cis
-
(hidden) suUxLBpC4
-
(hidden) o5paw2XWl
-
(hidden) seQarNuom #[[(hidden) 0EJ4yRKtM]]
-
(hidden) y2C7r0TtR
-
(hidden) 95-7isE3G
-
(hidden) LP8onBtPG