Submit

Back to the channels

#primate

  1. blue phaleth: hi
  2. phaleth hi blue
  3. blue so the point of my comment was that the current mechanism puts the colorscheme into a cookie. the reason for that is that on subsequent full page reloads, we read that cookie and can set the colour scheme in the HTML, so you don't get a weird flash
  4. blue if we remove the onHandle mechanism and the cookie, the mechanism is purely client side and you will likely see a flash
  5. blue I distinctly remember testing for this, so I'd be surprised if it suddenly worked without a cookie. but you'd need a full page reload
  6. phaleth ok, I will try that, but I think having the JS in the header is good enough to avoid flash
  7. blue JS in the header?
  8. phaleth in the head tag is what I mean
  9. phaleth script tag in the html head tag
  10. blue ah, right
  11. phaleth hmm, you are right, there is a flash on palemoon
  12. phaleth on epiphany it's flashing the same as current primate.run
  13. phaleth I think then it's better to dump local storage and always use cookie
  14. phaleth ok, so it's already broken after one of my previous changes
  15. blue the website is broken?
  16. phaleth sort of :D
  17. phaleth I got the fix
  18. phaleth now it does not flash even on epiphany
  19. phaleth blue: how long should the cookie persist? 30 days?
  20. phaleth I'll put in 9 days
  21. phaleth so it's a single digit
  22. blue sure
  23. phaleth ok, didn't manage to trim much of the fat, but at least now there is no background flash at all on epiphany
  24. blue that's great
  25. phaleth just little less than 0.5 kB of JS trimmed from the client bundle
  26. blue every byte counts
  27. blue we'll be doing the same for RP, anyway
  28. phaleth yup, that's why I try to do all this, cause I noticed you started working on repopack website
  29. phaleth anyway, thanks for the heads up on the flash
  30. blue yw
  31. phaleth the file naming is a bit incosistent
  32. blue where?
  33. phaleth I've just fixed the naming and already pushed
  34. phaleth so it's all good, btw I also got rid of extra requests to set the cookie
  35. blue ok
  36. blue how I test your PR, gh makes it so hard to switch to PR branches
  37. blue clanker is telling me to either install the gh cli tool (no go), or add your repository as remote
  38. phaleth you can hop onto the vps and deploy it there, I know that's like testing in production, but the changes are subtle
  39. blue yeah I wanted to test locally first
  40. phaleth then you can clone down my fork and checkout the branch
  41. blue mostly due to this line changing:
  42. blue <Icon name={$colorscheme === "dark" ? "sun" : "moon"} />
  43. blue of ot
  44. blue if it's not a store anymore, does it reliably change?
  45. phaleth yes, it's just a state now
  46. phaleth I've tested with librewolf, palemoon and epiphany
  47. blue ok I'll clone your fork, but damn I hate gh for making this so hard
  48. blue we gotta make this stuff easier with rp and item branches
  49. phaleth you can do it the git way, add a second origin and git fetch from that one
  50. phaleth then checkout the branch
  51. blue yeah I know, but this is dumb too. I don't want to add an origin for every contributor
  52. blue I seriously have no idea how this is supposed to scale
  53. phaleth it's overcomplicated, but that's how it is
  54. blue we can't accept that
  55. blue a golden path is a contributor having a branch like item/1 or item/website-optimisations and then I can just do git switch and test
  56. blue anyway, building the packages now
  57. blue so will test
  58. phaleth cool, do you have brave browser or something else chromium based?
  59. blue yes, I'm on brave
  60. phaleth nice
  61. blue man I hate pnpm
  62. blue primate/apps/website on master via  v26.1.0 pnpm install
  63. blue Scope: all 55 workspace projects
  64. blue primate/apps/website on master via  v26.1.0 npx primate
  65. blue Done in 447ms using pnpm v11.0.9
  66. blue Already up to date
  67. blue sh: line 1: primate: command not found
  68. blue seriously, pnpm is so bad
  69. blue and now I will delete the lock file and node_modules and run pnpm install and it will work
  70. phaleth try it from the root of the repo
  71. phaleth eh
  72. blue ya, already did, this is 100% pnpm being garbage
  73. phaleth you can do
  74. phaleth pnpm purge
  75. phaleth that will get rid of all node_modules in the whole repo
  76. blue yes but this is a freshly cloned repo
  77. blue this is really unacceptable
  78. blue ok, now it's working after deleting everything and running pnpm install again
  79. phaleth they are going to fix it with rust
  80. blue 100%
  81. phaleth will they succeed is the question
  82. blue looks great
  83. blue pr is in
  84. phaleth nice
  85. blue and we gotta move away from those PRs on RP. seriously
  86. blue they're killing me
  87. dreamreal why?
  88. dreamreal what about them is killing you
  89. blue I spent around 5 minutes on setting it up, and 10 seconds on testing the code
  90. blue that kind of overhead is 100% unacceptable
  91. dreamreal shoudl be a matter of git checkout, npm install (to update any dependencies), npm test
  92. dreamreal if that's not enough, someone's doing it wrong
  93. blue it's not, I'd need to add his origin to my git
  94. dreamreal that's... part of the checkout, no?
  95. dreamreal I guess I should have been more specific (or less): "get the changes"
  96. phaleth I think origin still needs to be added, just once for each contributor
  97. blue yes. and if I have 100 contributors, I need 100 origins, this is legit insane
  98. phaleth kinda like upstream also needs to be added when working on fork
  99. blue all I wanna do is `git checkout item/website-improvements`
  100. dreamreal if only there was a CI/CD pipeline idea, you could run CI/CD and validate the code works without having to do a lot, then you could look at the tests and say "do they validate the change being represented? no? reject until they do, and until they pass"
  101. blue and that means for gh I either need ot use their `gh` command line tool, which I'm not willing to, or I need to add `git remote add phaleth git@github.com:phaleth/primate` for every contributor
  102. blue both paths are dumb
  103. dreamreal at $work it offends the crap out of me to have my teammates say "CI/CD passed, let's test the code"
  104. blue but I don't want to run CI/CD. I want to test the code locally. CI/CD is assumed to have already prerun
  105. dreamreal has it?
  106. blue I don't have CI/CD, but that's not the point. the point is there should be an easy way for me to check out the contributor's branch, play around with code, look at it in the environment I'm best versed in, and push improvements upon it if necessary
  107. dreamreal yep
  108. dreamreal so identify what that means, and move towards it
  109. blue and I don't *want* that to be on some rando's repo which he could delete tomorrow, because that's weird, I want it to be as a branch on my repo
  110. phaleth we used to do CI/CD for primate, but it turned out to be too slow and sometimes there are build errors on master, which is alright, work is in progress
  111. blue gh totally destroyed the idea of forks. instead of properly using branches, every little thing is a fork of the whole repo
  112. phaleth I think I can create a branch on primate repo, but only cause I'm collaborator
  113. blue the funny thing is that issues and pr branches are already internally the same thing on gh
  114. blue so they're doing exactly what I'm talking about, but for some reason they're not exposing it to the surface
  115. blue (issue numbering and pr numbering are shared, that's how I know)
  116. phaleth gitlab uses separate counters for those
  117. blue yeah, but github unifies them, which means it sees them as the same thing, which they are
  118. blue my ideal workflow is easy. protect master from direct pushes, and have issues create server branches which assigned contributors can freely push to
  119. blue collabrators can freely create issues and selfassign, externals can only take on approved work, or lobby for it first
  120. blue that also prevents things like "why aren't you merging the PR I spent 2 weeks on without asking you if it was a good idea"
  121. blue 1st rule of thumb: ask the maintainer if this is a good idea
  122. blue in this case, phaleth is a collaborator/maintainer so he'd have no problem creating and selfassigning an issue or just creating a dedicated longterm server branch
  123. blue anyway, back to RP hacking
  124. blue phaleth: this hot reloading is kinda lit, I changed the font in the static dir, and it immediately picked it out
  125. blue I can't tell you I know exactly why because I'm not importing the woff directly anyway, it is referenced in master.css but that isn't imported explicitly, I guess I have primate generate virtual imports for it
  126. blue picked it up*
  127. phaleth yeah, primate just picks up whatever is in static dir, does not care if it's used
  128. blue we do have a js/css filter iirc
  129. blue so the fonts wouldn't be picked up automatically
  130. phaleth yeah, I've added woff2 to that filter
  131. blue oh, that explains it then, look it me, pumping my chest
  132. phaleth I think that's why font file names are now getting the content hash, kinda strange but works
  133. blue yeah
  134. phaleth I break things by changing things
  135. phaleth but those are just side effects anyway
  136. blue ya
  137. phaleth blue: I'll remove the handlebars dependency from primate website to speed up builds, is that okay?
  138. blue phaleth: it's used for the rss, no?
  139. phaleth yeah, I've managed to replace it with TS
  140. phaleth I'll just open up a PR
  141. blue k
  142. phaleth the website redeployment method does not work, the read/write layer of the container gets wiped out after podman container restart
  143. blue damn
  144. phaleth more reasons to speed up the build overall, tsgo was a good decision
  145. blue ya
  146. phaleth I'm thinking about removing svelte from primate website, google says there is over 22 kBs of unused JS (gziped), but it seems like there is more
  147. phaleth sounds like a huge undertaking
  148. blue you could probably replace it with htmx
  149. phaleth yeah, or html
  150. blue html would be lit
  151. phaleth heh

Search posts