Code Monkey home page Code Monkey logo

liascript's People

Contributors

599markus avatar andre-dietrich avatar cgarciaarano avatar dependabot[bot] avatar fillidefilla avatar jensengelmann avatar kokokotlin avatar maybejustjames avatar steigies avatar sujo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

liascript's Issues

Liascript Basec Editable Container

Hello, working with Lia has so far been a challenging experience.
While the availability and usability which are present are great, I am personally lacking a... let's call it... "div" that I can throw script-based elements/interactions/ ... in and have them been cleaned up on the leaving / return of the page.

I am currently toying around with a project, in which I am attempting to dynamically generate a task for a user. Said task I am currently having, along with an input field and an image in a div, that I have placed onto the page as a placeholder.
Upon reaching the part where the script gets activated, it fills the div with the necessary layout of button, text, and image to have a user work on...
So far so good... in theory... at least for me... a good idea...
Though when I switch to a page where I no longer employ my... "div" or... "place holder"... I suddenly find it displayed on the page...

After some... problem analysis... it was suspected, that this might be the case as the background process might not "clean up" a seemingly empty div... as... well... it's empty and therefore doesn't bother anyone... and nobody realizes that it's no longer empty.

Maybe I am using everything wrong... but... the idea of having an empty placeholder to be replaced dynamically with a script... sounds like an idea worth considering.
So... maybe just have an lia HTML-based element which is an empty div, and gets handled like any other object on the page (therefore removed upon switching to the next page) would be a great addition for this project.

Link to code page on individual course overview

Hi everyone,

The course overview (reachable by the home button) is essential to receive the basic information on all LiaScript courses. Beside delete and reset buttons, a link on the code of a course would be helpful.

When I asked my students for individual extensions of the material, they explained to me that they were not able to find the course on GitHub. A direct link would overcome this excuse :-)

Sebastian

WebAccessibility

There are still some points that need to be optimized in terms of Accessibility:

  • Quizzes
  • Surveys
  • Presentations with updated elements
  • Colors, at least in light-mode
  • Menues
  • Todo-Lists
  • Console output
  • ...

Formatierungsfehler durch Verwenden von ""

Mir ist aufgefallen, dass durch das Verwenden von Anführungszeichen ("") in einem Textabschnitt, die Formatierung von folgenden Objekten nicht mehr funktioniert. Definitiv konnte ich es bei den Kästchen beobachten, die man mit erzeugt und bei einem Link.

Das Kästchen wurde einfach nicht angezeigt, sondern nur Test mit den schrägen Strichen ohne Formatierung.
Bei dem Link konnte man keinen eigenen Name vergeben bzw. wurde einfach alles wieder genau so angezeigt wie man es in Markdown eingegeben hatte also z.B. statt title als Link konnte man [title](http://goo.gl/fGXNvu) sehen und es wurde nicht als Link erkannt.

Die Probleme verschwanden als ich die " durch zwei ' ersetzte. Dabei war es egal, ob die Anführungszeichen noch offen oder bereits geschlossen waren. Danach funktionierte die Formatierung nicht mehr, davor aber schon, als würden die Anführungszeichen die Formatierung deaktivieren.

Vielen Dank!

two sided page

I know it is possible to make a two sided page with HTML and Markdown but there must be an easier way. All I want is to have a picture on the left side and some Code samples on the right side.

In my opinion there are many usecases in Powerpoint slides for this feature. But I dont know how a to implement this.

Build fails on workbox injectManifest

Error output after running npm install && npm run build:

> npx workbox injectManifest workbox-config.js

command not found: workbox
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] sw: `npx workbox injectManifest workbox-config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] sw script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

After running npm install workbox-cli && npm run build:

> npx workbox injectManifest workbox-config.js

Using configuration from /home/jacol/Documents/elm/LiaScript/workbox-config.js.
Service worker generation failed:

Unable to find a place to inject the manifest. Please ensure that your service worker file contains the following: self.__WB_MANIFEST
    at Object.injectManifest (/home/jacol/Documents/elm/LiaScript/node_modules/workbox-build/build/inject-manifest.js:168:11)
    at async runBuildCommand (/home/jacol/Documents/elm/LiaScript/node_modules/workbox-cli/build/app.js:49:9)
    at async module.exports (/home/jacol/Documents/elm/LiaScript/node_modules/workbox-cli/build/app.js:138:11)

Support for H5P

I know this feature request could be way out of scope of LiaScript and its current goals. But I would like to at least discuss it here.

H5P is an openly documented specification for rich media content that can be implemented into websites especially learning courses. The libraries utilizing this scheme are also open source and based on JavaScript (as far as I can see). The functionality to open and run H5P-content is integrated into several LMS (namely Moodle, Brightspace, Canvas, Blackboard) via LTI and also CMS like WordPress or Drupal with plugins.

The current way of creating and hosting H5P-content is to use the authoring tools on h5p.org or using the plugins on WordPress, Drupal or Moodle. Those H5P-content can then be embedded as iframe or downloaded and shared as H5P-file (zip). Using the latter could be a chance to embed H5P-content into LiaScript without the need to host it at another website.

I added a test file for evaluation purposes: example-content-find-the-words-557697.zip
This is taken from the examples page and hopefully shows some capabilities of H5P and its structure.

Therefore, I request to evaluate the possibility to open up and run h5p-files directly from LiaScript. That would be a massive plus when comparing it to other LMS which do not support running those files out of the box. Apart from that H5P could be a big aggregator for OER and a smooth integration would clearly rise interest into LiaScript as an OER authoring tool.

TLDR:
LiaScript 📜 + H5P 🚀 = ❤️

Issues with settings panel

I've found a few issues in the settings panel.

Scrollbars everywhere

As can be seen in the screenshot every button and the whole panel itself have an unnecessary vertical scrollbar. This does not happen on mobile devices:

Desktop Mobile

The share panel has the same problem:
grafik

Buttons are confusing

If you want to choose another font for code view you can select from a list. The buttons are used in the same way (choose a theme) but why buttons instead of a list? This is a confusing UX at first.

Nightmode

I couldn't find the night-mode setting because I misinterpreted the word "Color" next to it. Also the moon is hard to see. Maybe use 🌙 or 🌜 instead of 🌝 ?
Would it be possible to automatically switch to a dark code style when changing to night-mode?

Font scaling

A font scale < 100% does also scale the frame sizes. At 80% I get a messy UI on my not FHD screen:
grafik

And also the gray-theme button seems to have a problem in dark-mode because the font color changes to a light one while the background is also in a light gray. This is due to the fact that the background color does not correspond to the theme color (see theme button in the last screenshot).

Hidden TTS does not work anymore

Inserting text, which should be read out loud, but not be visible to the user is not working anymore ...

<!-- --{{1}}--
list, blockquotes, tables, custom HTML, horizontal rules and dealing with
code-blocks. 
 -->

[WIP] Quiz comparison chart

⚠️ This is still a Work-in-progress thing. I'll remove the [WIP] tag as soon as it is ready.

What

A comparison chart for functions related to questions and quizzes available in LiaScript could be added to the documentation.

Why

This could improve some points namely:

  1. Users coming from other LMS wanting to switch to LiaScript searching for information if all functions needed are supported.
  2. Users wanting to know how to transfer their questions from their LMS repositories into a LiaScript file.
  3. Developers seeing what is worth implementing or what could be extended in the LiaScript universe.
  4. Fans wanting to share LiaScript as a comparable alternative to other LMS. 🚀

Sources

Marked ones have been investigated:

Table

How to edit the table:

Notes

Some additional notes and ideas about this topic:

  • I really have to restructure the table a bit:
    • Naming conventions are hard. Every LMS has another name for the same thing. Maybe these should be included to make the transition easier.
    • I need to separate content (accordion, charts, column etc.) from quiz stuff (Fill in the blanks, Image pairing, Multiple Choice etc).
  • The table is a first step to compare those systems. It could be an entry point in the docs that links to corresponding pages explaining how to create such things in LiaScript. So links could be added in the LiaScript column.
    • Example: "Text inputs" in the LiaScript column should be Text inputs
  • Some implementations of question types are very different in LiaScript compared to the ones listed. After the table is filled it should be investigated which are the functional differences and if they could be added in the future.
    • Example: Text inputs in LiaScript are different from the "Fill in the blanks" functionality of other LMS because for now you can't emebd the text-fields into a text. This is a function that could be added and so it should get an extra feature request in the issue tracker. Funnily there is one: #34

image does not load if an underscore is used in alt-text

I recreated and demonstrated the bug https://LiaScript.github.io/course/?https://github.com/EliasTechnik/EnglishPresentation/blob/main/imagebug.md

If an underscore is used in the alt-text of an image its get interpreted as a text-formatting character.

That does not load: ![ttally_controler class](img/lo_res/imagebug/ttally_controller.jpg)

That does load: ![ttally controler class](img/lo_res/imagebug/ttally_controller.jpg)

It seems that the underscore in the alt-text is a problem. Maybe the underscore in the path contributes also to it.

I am not sure if an underscore in an alt-text should be interpreted as a text-formatting character. If so please close this issue because it's not a bug.

Issues on mobile

I've tried to use the LiaScript docs page as a test for mobile usage. Here is a list of issues I've found there.

Starts with an open navigation bar

When opening the page the nav sidebar is opened. You have to click on the burger menu to start reading. It would be better if the nav-bar is hidden on mobile by default and only shows up by clicking on the burger menu (or adding the function that you could open it with a swipe from the left border).

Out of range problems

Some elements seem to get out of the view. This is sometimes hard to prevent (e.g. for tables) but also there are some issues with text overflow and such. I tracked it in the docs with some screenshots:


Zooming with two fingers

I accidently zoomed into it with the zoom gesture. I think this is a useful feature on mobile but I wasn't able to reset to 100%. Since the I'm getting problems like cut end of pages (not able to scroll down any further) and so buttons get lost:

I don't know if this problem comes from firefox (that I'm using on the phone) so that the adress bar on the bottom simply isn't substracted from the screen height or it is something that could be done on the websites settings. I also had other troubles with the adress bar unpredictably hiding my settings panel:

ezgif-7-d37cedf1c503

Cut radio buttons

I stumbled upon the issue that the radio buttons seem to be cut on the top and bottom of a quiz. This happens only on mobile devices:

photo_2020-05-14_07-27-20

[Feature request] Include diagram generation software

CodiMd has some great diagram generators included for flow charts, sequence diagrams and so on.
The usage is very easy and on the data side, meaning that you only have to specify the relations of the blocks.
See the CodiMd documentation Section with links to the involved javascript projects.

It would be good to have this features in LiaScript also. The ASCII System ist quite good but a bit cumbersome as you have to draw the diagram yourself.

How to force js reloads when navigating between pages

I have a bit of javascript that allows for animated gifs to replace static images so that learners can "click to play" gifs (see https://liascript.io/course/?https://raw.githubusercontent.com/arcus/education_liascript_experiments/main/gif_stuff.md#1, in Chrome as I'm troubleshooting other browsers).

I've used both the script: YAML (main branch: https://github.com/arcus/education_liascript_experiments/edit/main/gif_stuff.md) as well as the @onload macro (testing_onload branch: https://raw.githubusercontent.com/arcus/education_liascript_experiments/testing_onload/gif_stuff.md), and in both cases, the click-to-play in page 1 works in Chrome but if I navigate to page 2 and go back to page 1, it doesn't. I'm honestly not sure if this is due to my rusty js skills, incomplete understanding of LiaScript, or an enhancement opportunity. BUT. Can I force the reloading of scripts when a page is changed?

Simple repo with just enough to demo the problem: https://github.com/arcus/education_liascript_experiments

Support for Visual Studio Code

VS Code is a comparable editor to Atom and is used by alot of people. Maybe the reach of LiaScript could be extended by adding a liascript extension to its marketplace.

I'm not sure how the marketplace works but this could also benefit users of vscodium or code-server.

Add GitHub Task-Support

GitHub flavored Markdown supports the definition of tasks:

- [ ] not yet done
- [X] done

which is rendered as follows:

  • not yet done
  • done

It would be convenient, if LiaScript could support the same feature, which could be helpful to users to mark their progress, some properties, or something else. Furthermore, this should be combined with the LiaScript feature of attached scripts:

- [ ] not yet done
- [X] done
<script>
let task = @input // substituted by [false, true]
if (task[0] && task[1])
    alert("super")
else if (task[0] || task [1])
    alert("it is okay")
else
    alert("that is absolutely not sufficient")                             
</script>

Such attached scripts are not mandatory, but they allow to trigger a certain action, if the input value changes, which might be or might not be useful ;-)

ResponsiveVoice often pauses mid-sentence

If there is a limitation of max words or length of talking for the TTS service you use, I suggest to add a kind of queue to your wrapper.

If a TTS section exceeds the max length, the text is split up into sentences and the whole section is chained using the onEnd callback or killed at onStop.

This way any technically caused pauses are hidden between sentences.

Navigation via arrow keys does not work if focus is lost

Expected behavior

Currently it is somehow possible to use the arrow keys left and right to navigate through the slides.

Actual behavior

However, this is only possible if the navigation buttons at the top have been clicked at first and keep the focus, if they loose it, because the user clicks somewhere onto the slide, then these click events are not handled anymore.

Need help

These arrow-key events are handled in src/elm/Lia/View.elm by function onNavigationKey:

view : Screen -> Bool -> Bool -> Model -> Html Msg
view screen hasShareAPI hasIndex model =
Html.div
(onNavigationKey :: Settings.design model.settings)
[ view_aside hasShareAPI model
, view_article screen hasIndex model
]
{-| **@private:** release a navigation event, if the arrow key left or right had
been pressed.
-}
onNavigationKey : Html.Attribute Msg
onNavigationKey =
JD.field "key" JD.string
|> JD.andThen decodeNavigationKey
|> preventDefaultOn "keydown"
decodeNavigationKey : String -> JD.Decoder ( Msg, Bool )
decodeNavigationKey s =
case s of
"ArrowLeft" ->
JD.succeed ( PrevSection, True )
"ArrowRight" ->
JD.succeed ( NextSection, True )
_ ->
JD.fail "no arrow key"

However, I have no idea why this happens if the focus is lost. The event-handling happens on the main div and thus work for all child elements, if they do not disable event-bubbling... at least in theory.

Hints and suggestions are welcome ;-)

ChromeDev-Tools Optimization

LiaScript should be checked to fulfill most issues from ChromeDev-Tools in terms of Performace, Best Practices, SEO. Web-Accessibility is a separate point and requires more effort ...

Liascript broke since last release.

Since last release is Liascript for me not working. I can't use it on a Chrome based Browser and Firefox. Also Liascript-preview isn't working anymore.

Also i have tried to open this presentation.

[Feature request] Trivial customisation / theming

It would be nice to be able to add presentation theming hints in the markdown metadata that override the Lia theme.
e.g.

  • The "logo" could be displayed in the top bar (Not just in the courses cards).
  • A foreground colour scheme of 2 colours. Something like:
colors:
  primary: #abc
  secondary: #00ff33
  text: red
  background: grey
  • A font. Something like:
font: 
  - main:
    name: Fira Sans Condensed
    url: https://fonts.googleapis.com/css?family=Fira+Sans+Condensed&display=swap

or just

font: https://fonts.googleapis.com/css?family=Fira+Sans+Condensed&display=swap

Recomment rules for best use of Text-to-Speech

While enjoying your elmeurope2019 LiaScript presentation with your player I was irritated by the US female voice.

The phrase Sec. 1.2 was voiced as "seconds 1 point 2".

To avoid this, please recommend to your users to:

  • Test voice parts
  • Better avoid abbreviations. ie. write Section instead of Sec.

ASCII-Art should integrate LiaScript elements

Better integration of the LiaScript parser with the ASCII-Art parser SvgBob in order to support nesting elements in verbatim code. This might be useful for integrating formulas, images, links, maybe javascript code, etc.

``` ascii
+---------------------------+           +---------------------------+
| "$ f(x) = \frac{a+b}{x}$" |---------->| "[click me](https://url)" |
+---------------------------+           +---------------------------+
```

FeatureRequest: resizable terminal windows

Since the code output also supports images to be included, it is better to have a custom sized terminal, so that the user can decide what size fits the most. I guess this does not have to be persistent.

Enable external links via #section-title

1. Link to sections via #section-title

Currently sections are identified by numbers as URL-fragments ?https://course-url#slideNumber. It is possible to use the slide number as local references [link](#123) but it is also possible to use title tags [link](#some-title). However, linking to a certain section from another website or course, is currently only possible via section numbers. By using section-titles, linking would still work even if the structure of the course has changed.

Thus, linking to slides should be possible via:

  • https://liascript.../?course-url#12
  • https://liascript.../?course-url#section-title

2. Link to fragments (animation steps)

A section can contain multiple fragments, that are currently visible only in Presentation-mode. It could be beneficial to provide also references to these "subsections" such as [link](#section-title;fragmentNumber) and also to allow external links to point to specific animation steps. However, this breaks the common Markdown semantic and would not be compatible to other Markdown reader/interpreter anymore.

Maybe the fragment could be provided as part of the link title, that is then interpreted a bit differently:

[fragment-2](#section-title)

Or there is another kind of reference-syntax that I am currently not aware of, that allows to add additional information to a local reference?

Preview for Wikipedia links

It would be great to have a mouseover preview for links to Wikipedia articles like it is done in Wikipedia, so that the user does not need to go to the website of Wikipedia if a brief preview is sufficiant for understanding. This would make reading more fluent.

Add support for hyper, dat, ipfs and ipns protocol

Currently elm does only support http and https. Other browsers do also support peer2peer protocols for file and website-shareing, such as the Beaker Browser which supports hyper:// and dat://, or the Brave Browser that supports ip(f/n)s://. In order to enable course-sharing by using these protocols, it is required to add this support to LiaScript

Text and Table Quizzes

At the moment LiaScript supports, simple text quizzes [[solution]] , selections [[(**right**)|wrong|wrong wrong]], single-choice [(X)], multiple-choice [[X]], matrix and generic [[!]] quizzes. Text-quizzes and selections should become part of normal paragraphs and tables, such that the following example could define more complex quiz-type:

This is an [[example]] of a [[ (quiz) | horse | utter nonsense ]],
which [[might]] be 
[[ interesting
| (helpful)
| helpfully
| I do not know ]]
for other to create quizzes.

The same elements could be used also within a table.

Note: The vertical lines | within the selection might cause some problems with tables, rendered by other Markdown editors.

[Feature request] Private GitHub LiaScript courses

Hi Andre,

currently, it is not possible to "execute" course from private GitHub repositories. Inexperienced users asked for this feature hoping to implement first steps with LiaScript without public visibility. Of course, they did not consider that the history of the attempts is still available :-)

Looking forward to further discussions!

Sebastian

Cannot find any license information

I suggest to either use the Github WebUI or to add a LICENSE.txt/.md and clearify the licensing situation.

Whether you use a viral GPL or a less limiting BSD/MIT/Apache will decide about future developments, re-use of this gem.

Issues with toolbar

I've found some issues with the toolbar.

Search is buggy

Test link: https://liascript.github.io/course/?https://raw.githubusercontent.com/liaScript/docs/master/README.md#1

Just type in Tools (it's the second header after the start page). It can't be found. It seems that the search only goes through the paragraphs and not the headings?

Delete search terms with an X

If I'm searching for stuff the navigation reduces itself to the pages that may contain my search terms. This is okay but it leads to the problem that when I want to get back to the normal navigation overview I have to delete my search term. A simple X at the end of the search bar could be added to instantly delete the current search terms and to get back to the normal view.

Buttons

The buttons for burger menu, index, previous and next page and also mode are very small. They are barely 'readable'. Also this is a problem on mobile devices but I'll discuss this in another issue.

Despite the small size their width seems to be variable. They don't have a static ratio like quadratic or 16:9 or whatever. Instead their width differs a lot an so the click area does. See here for reference:

mSCNZdDt5b

Index

I was confused about the home button. I thought it would bring me to the first page but I got to my own Index page (UX problem). I tried to get back but the back button is not working there (UX). Maybe another symbol could be used for the Index page? Or it could be moved down - left side of the user settings button. This would make it more clear that this button has nothing to do with the current course.

Make the templates more discoverable

When I'm searching for a template my first obstacle is to find the templates repositories. I often forget that it is not located in the LiaScript org.
While searching, I always go to the github.io website and often I scroll over the link (below JavaScript Ready).

My first idea would be to add a specific link into the navigation bar at the top of the github.io page. This could be also done for the LiaBooks.


Just another fact about the website:
When clicking on one of the navigation links the page jumps to the specific part. But when I'm searching for the Docs and I click on the Docs I would expect the website to bring me directly to the docs. But I have to click another link which is called 'here'.

Maybe the navigation bar could be divided into page-jumping links (explaining what LiaScript is) and direct links to specific places (docs, templates, books, source, blog)?

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.