Git Product home page Git Product logo

docs.raku.org's People

Contributors

2colours avatar altai-man avatar ciavash avatar codecanna avatar morayj avatar ogdenwebb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docs.raku.org's Issues

A wish: Search bar readily accessible

(My personal wish, YMMV)

How any search engine (like duckduckgo) offers a search bar to the user:
you open their webpage, and the search field is right before you, and it is focused straight away and webpage is ready to accept your keyboard input, you start typing immediately without any additional movements.

This is the right way (IMHO).

With https://docs.raku.org/ you fireup the page, the search bar is there waiting for input but it is not focused.
Darn it! Excessive mouse movements and a click or 2 tab presses are needed to focus.

Now take your temporary http://164.90.207.89:10010/
With wide enough screen, the search bar is there, but not focused,
you need excessive mouse movements and a click or 8! tab presses.
With narrow screen, the search bar isn't even displayed, so you need to move that mouse into the corner, then click and, guess what? You get the search bar in the opposite corner of the pane! Your cursor loves to be moved across the screen forth and back! 😄

Please note that with the window size as in the screenshot, there is enough space for the search bar.

search bar not displayed
Search bar not displayed
(Also please note vertically misaligned Learn more button under Language Reference & Tutorials)
search bar in the opposite corner
Search bar in the opposite corner

A keypress like / for triggering search might mitigate the issue, yet why hide that poor search bar in the first place?

Search bar animation. Why? I come for docs, and want them promptly. With animations I get distracted and they make me wait while animation finishes.

Github search bar like on this page is also expandable, but it is not that bad as it expands left-to-right, and the input cursor stays in place.
With your temporary http://164.90.207.89:10010/ the bar expands right-to-left, and the cursor flies away from the spot where it was which distracts and makes me seek that cursor again.

Recap:

  • Please make search bar ALWAYS VISIBLE.
  • Please make search bar FOCUSED on newly-opened pages.

Make search smarter

There is a ticket Raku/doc#1086 requesting a very neat, yet a bit intricate feature. In short, it suggests that additional information in the search query (for both quick search field in the header and the search page (see #14)) should narrow the search.

Current categories we have now are, alas, quite muddy, but hopefully this will be fixed sooner or later.

A number of rules can be imagines, but let's go with this:

  • . (a dot) before the query suggests to search in method category only
  • & before the query suggests to search in routine category only
  • () at the end suggests both method and routine categories only
  • :: at start suggests role, class, package categories only

It will be also pretty cool to have simple tests for this around.

Filter searching broken

Using symbols to select a specific catgory ((), &, .) in the search field isn't working as expected.

Top level search page is needed

This is a big and interesting ticket.
There is a long term demand (Raku/doc#1099) for serving a dynamic page for search.

It can be either JS-based or backend based, but looking at various options I myself did not really find anything that seems okay-ish enough just as JS we use now.

Right now, we serve such a static page:

2020-12-05-183401_1920x1080_scrot

We need pieces of JS to handle everything on it. This includes:

  • On typing in the search field we should query our JS search data and display formed results according to the layout in the UI mock-up.
  • Results counter is at the top right, it should be updated.
  • It has to be able to know about specific category chosen at the top left select and filter out results.
  • If the page is opened with q=fofofo query parameter, JS has to understand this, pre-fill the input with fofofo and display results for that, so that we could point this template to other search engines.

What is interesting here is that we want to avoid duplicating lots of code from search.js we have now (it will be inevitable anyway, but let's try to make the code structure as organized as possible).

search with small port has UI issues

in chrome (on mac)
set size to 970x976 (e.g.)
click on the hamburger
click in search
type test, hit the magnifying glass icon
search results show up under the input box, but you can't scroll to see them

Top navbar search should respect small screen layout

If you keep the style attribute (style="width: 200px;") within the navbar search field, it will break input size on small screens.

Scenario to reproduce

  1. Open browser inspector/devtools and choose 720p screen.
  2. Use horizontal orientation.
  3. Type something to search in navbar.
  4. Deselect the search field and switch to vertical orientation in inspector/devtools.
  5. Open a hamburger menu.

Publish highlight styles

They work not worse than they were on the previous website locally, but with styles not published do not make a lot of sense, so adapt and publish highlighting styles file.

I get a SSL_ERROR_RX_RECORD_TOO_LONG randomly

So I have been getting this error since using the site. It usually doesn't appear right away, but after going to a few links on the page to other parts of the site. I am using Firefox 87.0 with Pop_OS! latest. I'm happy to provide more data if needed.

The only pattern I can discern is that if I start a fresh session or go to https://docs.raku.org/ directly I can get to a few pages before getting the error, and then to continue using the site I have to go to that link again directly. But now however I am noticing that if I come directly to that link, sometimes I get what appears to be the CSS failing to load:
image

I'm also getting some JS errors:
image

And after refreshing I get:
image

Examples runner need to display its status clearly

Right now, when Run button on the example is clicked, nothing visually says about what happens... And then the result appears. However, it may take a long time and it's a bad thing to make the user worry about what is happening.

Thus we need to give a clean visual hints about what's happening, say a spinner with "We process your request blah blah" kind of thing.

The relevant code is at https://github.com/Altai-man/docs.raku.org/blob/master/static/js/core.js#L84-L109

Search breaks when searching for "garbage-collection"

With breaking I mean that the dropdown doesn't appear and when pressing enter the letters that were there when the dropdown worked for the last time is searched, not the current word.

"garba" works
"garbag" doesn't work, searches for "garba"
"garbage" works
"garbage-" doesn't work, searches for "garbage"
"garbage-c" and anything longer doesn't work, searches for "garbage"

Document how to update doc repo

We have docker instructions for doing the initial build of the site - because this takes a while, we probably need instructions on how to do the minimum to update the docs site; I'm guessing we also want those instructions to end with swapping out the old running site for the newly updated container, but I'm not 100% sure.

Errors following README instructions

After following README, last instruction is:
DOCKY_PORT=20000 DOCKY_HOST=localhost raku -Ilib service.p6
Results in errors:
'Docky::Renderer::TOC' cannot inherit from 'TOC::Calculator' because it is unknown
I can remove is TOC::Calculator from Docky::Renderer::TOC without any obvious immediate errors.
But next error is from Docky::Renderer::Node which cannot inherit from 'Node::To::HTML' because it is unknown
Removing the inheritance leads to immediate errors with undelcared routines escape_id and node2rawtext
I can't find TOC::Calculator or Node::To::HTML in the Raku Modules directory.

<code> has too much padding?

http://localhost:10000/routine/coll

coll is a sorting operator that takes pairs of Strs, Cools or Pairs and returns an Order that uses the $*COLLATION order. The default behavior disregards diacritic marks and capitalization, for instance.

The Strs here renders more like Str s because of the padding

Search results visualization is inconsistent

There are two issues. For example, type dir:

2020-12-21-222158_1920x1080_scrot

^ It, apparently, tries to sort categories alphabetically, but I believe we want to sort them by if there are exact matches (first) or the string contains (next) and then the rest.

So for dir you will see:

Routine
dir (exact match)
(other results from this category)

then

some category blah blah
blah blah dir (the string contains the exact word, but has other things besides) - a function blah blah

then

some category blah blah
DIgital Routine (no exact match at all, just fuzzy)

But when you look at it closer, it seems like items from the same categories are not grouped properly? We should investigate why it behaves in this strange way. Yes, there are both "Routine" and "routine" categories due to Raku/doc#1410, but even so it is odd to have the same category items in different places.

2020-12-21-222222_1920x1080_scrot

First time loading of content pages is deadly slow, second time is just very slow

On my machine it measures like 9 seconds to display /type/Array and 1 second after it is cached. Both cases are clearly unacceptable, so we need to do a wide range of efforts to make it much faster.

Possible ideas investigated:

  • Using Cro::WebApp over Mustache shaves off seconds. Blocked with Raku/Pod-To-HTML#82
  • About 80% of time is spent awaiting for the coffee script to highlight code snippets, with over 300 of them on a page it takes a lot. The temporary (?) solution possible is to heavy cache results and pre-fill cache on the app start. With a couple of docker containers in kubernetes chances of downtime won't be too high.

Need a better infrastructure

The demo website we have now resides in a Docker container with network share, the cache is heated.

However, for some reason serving pages, even static ones, is very slow, 100-1000x slower than what it looks like at localhost set up in a similar way (running via Docker, not a real thing which is even faster).

We need an infra pro to investigate what causes this slowness and find a solution.

License?

Is this repo licensed under the same Artistic License 2.0 as Raku/other main Raku projects? If so, I'd be happy to submit a PR adding the LICENSE and updating the META6.json – but I don't want to assume, since it's your project and you get to pick the license 😁

not all examples should be runnable

Not all examples generate output (or are intended to be standalone runnable snippets). It would be nice to be able to mark certain examples as runnable or not (depending on what we make the default).

Something like :!runnable on the example's Pod?

Filtering in Table of Contents

Besides browser searching on a page, it is possible to filter Table of Contents.

Current implementation can hide subtrees of headers that do not match the query, but we can provide a much better experience here.

For example, open /language/functions page.

While ideas are welcome, main points can be:

  • Highlight in bold or some other clear visual way suitable entries matching.
  • Hide not matching subtrees on each level, not just the first one (as done now).
  • Review / cleanup the code.

Current implementation resides at https://github.com/Altai-man/docs.raku.org/blob/master/static/js/core.js#L179-L206 and wants some love.

TOC hover-over can be confusing on mobile

image
On mobile the TOC can overlap the content. I sometimes are confused for a bit by the result. In the above case wondering, why the operator precedence table contains only examples.

My spontaneous idea would be to hide the TOC by default when it would overlap the content.

A lot of `malformed syntax` messages from /routine section during site stresstesting

Heated 3080 pages out of 4108
[OK] 200 /syntax/do - ::1
[OK] 200 /language/unicode_ascii - ::1
[OK] 200 /language/objects - ::1
[OK] 200 /language/faq - ::1
Malformed request line
  in sub bad-request at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/8D550C0EA64DE2438CC3713E5F5EEBE05B31D048 (Cro::HTTP::RequestParser) line 156
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/8D550C0EA64DE2438CC3713E5F5EEBE05B31D048 (Cro::HTTP::RequestParser) line 69
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/8D550C0EA64DE2438CC3713E5F5EEBE05B31D048 (Cro::HTTP::RequestParser) line 51
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/FBA08400E3B6F5CB851768D6362B3ED3DD054756 (Cro::TCP) line 52

[OK] 200 /syntax/need - ::1
[OK] 200 /language/py-nutshell - ::1
...
Unable to parse URI '/routine/�': malformed syntax
  in method parse-request-target at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/6ADBF308703C5CCA8AEE112BA5C745D7F3986394 (Cro::Uri::HTTP) line 37
  in method ensure-cached-uri at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/9E74E3BA0C86314EAF9EBAD5985609AC59A224FD (Cro::HTTP::Request) line 132
  in method path at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/9E74E3BA0C86314EAF9EBAD5985609AC59A224FD (Cro::HTTP::Request) line 96
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/7E3F216F834F3015FB006B1C378858BD35B49B37 (Cro::HTTP::Router) line 226
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/9963EC1A4D584766640A77FE4C36A9631567F9B4 (Cro::HTTP::Internal) line 22
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/8D550C0EA64DE2438CC3713E5F5EEBE05B31D048 (Cro::HTTP::RequestParser) line 122
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/8D550C0EA64DE2438CC3713E5F5EEBE05B31D048 (Cro::HTTP::RequestParser) line 93
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/FBA08400E3B6F5CB851768D6362B3ED3DD054756 (Cro::TCP) line 53

Unable to parse URI '/routine/�': malformed syntax
  in method parse-request-target at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/6ADBF308703C5CCA8AEE112BA5C745D7F3986394 (Cro::Uri::HTTP) line 37
  in method ensure-cached-uri at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/9E74E3BA0C86314EAF9EBAD5985609AC59A224FD (Cro::HTTP::Request) line 132
  in method path at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/9E74E3BA0C86314EAF9EBAD5985609AC59A224FD (Cro::HTTP::Request) line 96
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/7E3F216F834F3015FB006B1C378858BD35B49B37 (Cro::HTTP::Router) line 226
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/9963EC1A4D584766640A77FE4C36A9631567F9B4 (Cro::HTTP::Internal) line 22
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/8D550C0EA64DE2438CC3713E5F5EEBE05B31D048 (Cro::HTTP::RequestParser) line 122
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/8D550C0EA64DE2438CC3713E5F5EEBE05B31D048 (Cro::HTTP::RequestParser) line 93
  in block  at /home/koto/.rakubrew/versions/moar-2020.10/install/share/perl6/site/sources/FBA08400E3B6F5CB851768D6362B3ED3DD054756 (Cro::TCP) line 53

[OK] 200 /routine/hour - ::1
[OK] 200 /language/intro - ::1

Animation of search bar is clearly buggy

The original intent was to have a search input similar to github one - it does not take a lot of space, but when clicked it is expanded.

The code that tries to achieve that resides at https://github.com/Altai-man/docs.raku.org/blob/master/static/js/core.js#L210-L229 but it is clearly buggy even if you are not very persistent - a couple of clicks due to slowness of the animation is enough to confuse the search input, break the page layout and cast demons from other world.

This ticket is resolved if this behavior is done in a stable, cross-browser and eye pleasing way with minimal efforts.

Sort out the situation with versioning

It includes:

  • Working out a good enough spec for metadata of this
  • Talking it over and merging it for at least some cases in main docs repo
  • Adapting our rendering code and UI to match the spec

Logging for 404 and 500 errors

We want to log 404 errors to add redirects wherever usable and 500 errors to fix bugs.

Technically it is just extending handlers at https://github.com/Altai-man/docs.raku.org/blob/master/lib/Docky/Routes.pm6#L26-L29 with something writing a log somewhere where it is nicely visible. Potentially with squashing duplicated errors? Something fancy is welcome.

The redirect checking will be more interesting in case of superseding the original docs website, but we need to have it structured sooner than that.

Not all dependencies listed in README

Not all dependencies are listed in the README file for following the instructions.

Without node, there is a Node:from<bin> error
Without graphviz, there is a dot:from<bin> error
Without coffeescript, the pages hang for a long time before loading.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.