Raku / doc-website

Tooling to build/run the documentation website
Artistic License 2.0
7 stars 10 forks source link

Docs dev #364

Closed finanalyst closed 4 months ago

finanalyst commented 4 months ago

This is now working as planned on new-raku eg 101-basics Also try about where the information in the page is about the repo, with separate information about the Raku/doc-website files, and the Raku/docs files, as well as information about the 'about.rakudoc' file itself (not its contents) in the Commit footer and edit button

coke commented 4 months ago

"About the new-raku.finanalyst.org websitr"

coke commented 4 months ago

Mousing over commit is slow. If you hadn't told me something was there, I would have just kept moving.

dontlaugh commented 4 months ago

We're missing a plugin on the CI system


1 bin/ script [collection-refresh-plugins] installed to:
--
  | /home/builder/MoarVM/install/share/perl6/site/bin
  | <git clone https://github.com/Raku/doc.git local_raku_docs/> was successful
  | Error occurred when processing source file 「local_raku_docs/doc/language/101-basics.rakudoc」.
  | No such method 'last-edited' for invocant of type 'PodFile'  in block <unit> at ./bin_files/build-site line 3
  | in block MAIN at ./bin_files/build-site line 5
  | in block collect at /home/builder/MoarVM/install/share/perl6/site/sources/8FF8035D035FB265D24BF86A9F6B0B5BD78CA772 (Collection) line 21
  | in block collect at /home/builder/MoarVM/install/share/perl6/site/sources/8FF8035D035FB265D24BF86A9F6B0B5BD78CA772 (Collection) line 260
  | in block collect at /home/builder/MoarVM/install/share/perl6/site/sources/8FF8035D035FB265D24BF86A9F6B0B5BD78CA772 (Collection) line 21
  | in block collect at /home/builder/MoarVM/install/share/perl6/site/sources/8FF8035D035FB265D24BF86A9F6B0B5BD78CA772 (Collection) line 305
  | in block report-method-not-found at src/vm/moar/dispatchers.nqp line 676
  | in block throw_or_die at src/Perl6/Metamodel/Configuration.nqp line 60

@finanalyst do you intend to check that into this repo like the others? If not, I will need to update the image that the CI environment runs in.

That is, unless that error isn't a Collections plugin issue at all 😊

finanalyst commented 4 months ago

@dontlaugh I will need to look at this. You said:

If not, I will need to update the image that the CI environment runs in. These changes need the latest versions of Pod-Render and Collection. Does that require a change of the image?

finanalyst commented 4 months ago

@coke

Mousing over commit is slow. If you hadn't told me something was there, I would have just kept moving.

It is slow. I'm not sure whether it is a deliberate browser delay or something that can be fixed in CSS. A popup is generated magically when a tag has a title attribute. But I have not seen any information about the delay on mouse-over.

dontlaugh commented 4 months ago

@coke open the browser tools memory profile tab while you mouse over. Just to make sure it's not loading something big on the fly

finanalyst commented 4 months ago

@dontlaugh I have made sure that the distribution versions working for me locally are now uploaded to fez (I think they were, but maybe not :) ) . The two distributions that needed changing were Raku-Pod-Render and Collection. I have just bumped the version requirements in META6.json file in this branch. I tried hard to ensure that the new versions are backwards compatible. The error seen above was because I added another attribute to the PodFile class to hold the commit data. This will not affect older versions of Collection, which dont look for it, but will affect the new version of Collection, which does.

finanalyst commented 4 months ago

@coke I just googled the title delay, and found a stackoverflow thread. Apparently not possible to dictate using 'title', which leaves it to the browser. (Presumably some browsers more customisable than others).

This mod has already taken up FAR FAR more time than I thought it would for a simple addition of data. So I am loath to add extra divs and CSS to get a faster popup.

For those for whom the information will be useful, they will soon find out or be told to wait.

finanalyst commented 4 months ago

@coke @dontlaugh The last commit worked properly. The changes can be seen on docs-dev. The pop-up seems to work quite fast. It may be a server or cache issue as well.

Also the commit id on about has three different commit strings, one for the Raku/doc repo, one for the Raku/web-docsite repo, and one for the About page itself.

Just noticed an error on About. Will fix now. Fixed

coke commented 4 months ago

"This is now working" - what's this PR about? Should I be looking at your site (which still has the typo I called out at the top) or docs-dev?

finanalyst commented 4 months ago

@coke several things

  1. @dontlaugh +++ has done some magic so that any patch to the docs-dev branch automatically deploys to docs-dev.raku.org. This means that we can experiment a bit inside the doc-website environment without it affection the main branch or being pushed to production. It also means that there is not the problem of desynchronisation between my new-raku site.
  2. The PR on the docs-dev branch concerns adding commit information to each documentation file. The commit information is not immediately obvious, but is there so that someone who has edited the documentation sources can know whether the edits have yet been included onto the production site, or when a source was last edited.
  3. My new-raku site does have synchronisation problems - the spelling mistake is an example (thanks, I hadn't noticed it, even when you pointed it out). You will see that the about page on docs.raku.org does not have the error. I'll fix it soon.
  4. My IRC message to you was intended to ask you to look at 'docs-dev', decide whether the commit information is any good (I am strongly hoping you will like it), and to let me know what to do.
  5. I want to start using 'docs-dev' for the ebook patch. I have an ebook that builds, but it needs some wider testing and review, eg. Kindle requires some slightly out of standard tweaks to get a TOC, but I dont have a Kindle to test the ebook with.
  6. I can't upload the EBook patch until we decide what to do with the commit info idea.

Hope this is clear now.

coke commented 4 months ago

Having the only the commit SHA id only appear on mouseover doesn't really help with knowing when something was edited - there's no easy way to get from there to the source code, or to even cut and paste it if I wanted to manually run a git command. I agree it should be something you have to do to see it (not on the page by default).

I think we can merge this as is, but as a followup, I'd love to see something where the commit info had at least one of:

Note: you could also use git to switch which commits correspond to a branch called docs-dev (you could save this WIP as another branch name, delete this branch, then recreate a fresh one from MAIN, or have a different branch already in progress you renamed to docs-dev - in case we get stuck at some point in the future on whatever happens to be in docs-dev).

finanalyst commented 4 months ago

@coke I have merged. If you hover over the edit button, you will get the commit id & the date relating to when that source was last edited - if the source can be edited