Giter Site home page Giter Site logo

riot.github.io's Introduction

Riot logo

Simple and elegant component-based UI library

Build Status MIT License Join the discord community channel Join the chat (ja) at https://riot-jp-slackin.herokuapp.com/ OpenCollective Backers OpenCollective Sponsors

NPM version NPM downloads jsDelivr Hits Coverage Status Riot Size Code Quality

Sauce Test Status

Custom components • Concise syntax • Simple API • Tiny Size

Riot brings custom components to all modern browsers. It is designed to offer you everything you wished the native web components API provided.

Tag definition

<timer>
  <p>Seconds Elapsed: { state.time }</p>

  <script>
    export default {
      tick() {
        this.update({ time: ++this.state.time })
      },
      onBeforeMount(props) {
        // create the component initial state
        this.state = {
          time: props.start,
        }

        this.timer = setInterval(this.tick, 1000)
      },
      onUnmounted() {
        clearInterval(this.timer)
      },
    }
  </script>
</timer>

Open this example on Plunker

Mounting

// mount the timer with its initial props
riot.mount('timer', { start: 0 })

Nesting

Custom components let you build complex views with HTML.

<timetable>
  <timer start="0"></timer>
  <timer start="10"></timer>
  <timer start="20"></timer>
</timetable>

HTML syntax is the de facto language on the web and it's designed for building user interfaces. The syntax is explicit, nesting is inherent to the language and attributes offer a clean way to provide options for custom tags.

Performant and predictable

  • Absolutely the smallest possible amount of DOM updates and reflows.
  • Fast expressions bindings instead of virtual DOM memory performance issues and drawbacks.
  • One way data flow: updates and unmounts are propagated downwards from parent to children.
  • No "magic" or "smart" reactive properties or hooks
  • Expressions are pre-compiled and cached for high performance.
  • Lifecycle methods for more control.

Close to standards

  • No proprietary event system.
  • Future proof thanks to the javascript module syntax.
  • The rendered DOM can be freely manipulated with other tools.
  • No extra HTML root elements, data- attributes or fancy custom attributes.
  • No new syntax to learn.
  • Plays well with any frontend framework.

Use your dearest language and tools

Powerful and modular ecosystem

The Riot.js ecosystem is completely modular, it's designed to let you pick only the stuff you really need:

CDN hosting

How to contribute

If you are reading this it's already a good sign and I am thankful for it! I try my best working as much as I can on riot but your help is always appreciated.

If you want to contribute to riot helping the project maintenance please check first the list of open issues to understand whether there is a task where you could help.

Riot is mainly developed on UNIX systems so you will be able to run all the commands necessary to build and test the library using our Makefile. If you are on a Microsoft machine it could be harder to set up your development environment properly.

Following the steps below you should be able to properly submit your patch to the project

1) Clone the repo and browse to the riot folder

git clone [email protected]:riot/riot.git && cd riot

2) Set up your git branch

git checkout -b feature/my-awesome-patch

3) Install the npm dependencies

npm i

4) Build and test riot using the Makefile

# To build and test riot
$ make riot

# To build without testing
$ make raw

5) Pull request only against the dev branch making sure you have read our pull request template

6) Be patient

Credits

Riot is actively maintained with ❤️ by:


Gianluca Guarini

Many thanks to all smart people from all over the world who helped improving it.

Official Website

https://riot.js.org

Backers

Support us with a monthly donation and help us continue our activities. Become a backer

Backers

Sponsors

Become a sponsor to get your logo on our README. Become a sponsor

Sponsors

Thanks

Special thanks to Browserstack for their support

browser stack

riot.github.io's People

Contributors

akikokosakajp avatar amarcruz avatar cognitom avatar damusix avatar dependabot[bot] avatar dysphasia avatar eliot-akira avatar fnd avatar gianlucaguarini avatar infuzz avatar jonathanwolfe avatar juodumas avatar kfreiman avatar kkeeth avatar markgarrigan avatar martinmuzatko avatar narikei avatar nibushibu avatar peterdavehello avatar potato4d avatar raxell avatar rsbondi avatar sblondon avatar shimeiwo avatar sottar avatar sylvainpolletvillard avatar syuilo avatar tipiirai avatar wellguimaraes avatar yumemi-kuwahara 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

Watchers

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

riot.github.io's Issues

weird bug with Jekyll and section titles

I managed to get around this issue for french translation v2.2.4, but it will probably become a problem for others translators too.

Jekyll can not handle special characters in section titles. It causes weird id attributes and the genereated DOM has many issues

### Boucler sur des tags personnalisés

Vous pouvez également boucler sur des tags personnalisés. Par exemple:

generated:
image

Do you know a way to fix this ? Maybe I should have posted on jekyll repo but I did not find a solution there

Forum tab-size

Hello there!

In the forum, preformatted blocks of code do not have a tab-size.
Which means that codeblocks that contain tabs, are indented by 8 spaces.

Please add tab-size: 4; to .m-syntax in the styles.
Or 2 if you prefer, I think 2 is the default for most code displayed in the guides.

If someone could point in the contributing infos where styles can be adapted, I'd be happy to do a pull-request.

ru/v2.2.4

Russian translation is started https://github.com/kfreiman/riot.github.io.

Помощь приветствуется!

  • Common layouts and includes
  • index.md
  • forum.md
  • faq.md
  • download.md
  • compare.md
  • guide
    • index.md
    • application-design.md
    • compiler.md
  • api
    • compiler.md
    • index.md
    • misc.md
    • observerable.md
    • route.md

Jade documentation

According to this issue it seems that some users may need help using riot with jade so we may need to consider dropping some lines about it

Translation maintainers

Hi guys, I'm so happy to see the progress on the translations!
zh, ja and fr have finished, and ru seems almost done, and de has many pages translated already.

I think we should invite them as a maintainer (collaborator) for each language. (if they say ok)
@GianlucaGuarini @aMarCruz @tipiirai @rsbondi how do you think?

language current ver. maintainer
en latest who?
es translating @aMarCruz
de translating @MartinMuzatko
fr v2.2.4 @sylvainpolletvillard
ja v2.2.3 @cognitom
ru translating @kfreiman
zh v2.2.4 @Centaur

To maintainers: Pls add tags when translation complete

@riot/collaborators thanks for your continuous contribution!
Now we have 6 languages completed ;-) en es fr ja ru zh

If you push your commits via PR I can add a tag (ex. fr/v2.2.4) manually after merged. But if you push them directly into master, I can't track it, sometimes, so could you pls add tag by yourself?

I've added some instruction to CONTRIBUTING.md. Have a look at it. Thanks!

  • Send PR to master branch and let someone merge it. (PR is preferred way, but, maintainer can merge it directly if the change is small)
  • Remove working branch: ex. fr/v2.2.4 or ja/v2.3.0
  • Add tag: ex. v2.2.4-fr or v2.3.0-ja

https://github.com/riot/riot.github.io/blob/master/CONTRIBUTING.md#when-translation-complete

de/v2.2.4

Issue for translating the website to german.
I'd love to invite @whazap to have a look on riotjs and contribute if possible.

TODO

  • Finding labels for most of the nav-items, most of them are anglicism. (router, compiler, etc.)
  • API -
  • Merging Master commits
  • finding a proper name for "custom tag" - "eigener Tag"?
  • Common layouts and includes
  • index.md
  • forum.md
  • faq.md
  • download.md
  • compare.md
  • guide
    • index.md
    • application-design.md
    • compiler.md
  • api
    • compiler.md
    • index.md
    • misc.md
    • observerable.md
    • route.md

Meanwhile: check out my fork: https://github.com/MartinMuzatko/riot.github.io/tree/riot/de/v2.2.4

"Experimental" section in comparison with Polymer out of date

The "Experimental"-section in the Polymer-comparison (http://riotjs.com/compare/#experimental) is out of date - the support is much better now (http://jonrimmer.github.io/are-we-componentized-yet/) and microsoft will implement webcomponents eventually (https://blogs.windows.com/msedgedev/2015/07/15/microsoft-edge-and-web-components/)

Especially the last sentence ("It’s uncertain whether Web Components will ever be natively supported.") isn't true anymore.

Troubleshooting

I always get into certain situations, where I think I did everything right and then just run into an error I don't quite understand first.

Like recently:

Uncaught TypeError: Cannot convert undefined or null to object

After changing the minified version with the original one, to see where the problem happens, I find out that I forgot to include a mixin.. doh!
Are we going to change something about validating and throw proper errors, or will we have to document a troubleshooting guide to publish some things that could happen and how to fix them?

Should we translate quotes?

Talking about these twitter quotes:

I looked at the riot.js example, and it feels so clean, it's scary. @paulbjensen

Just messed around with #RiotJS for an hour. Got it setup with Gulp, Browsesify, and Babel in no time. I like it a lot so far! @AndrewDelPrete

Today I have used #riotjs 2.0 for the first time and I could admit that It will be a long term relationship #js highly recommended. @gianlucaguarini

Should we translate them, or leave them as they are?

Please document in the CONTRIBUTING.md accordingly.

Thanks!

Getting more done in GitHub with ZenHub

Hola! @s-melnikov has created a ZenHub account for the riot organization. ZenHub is the only project management tool integrated natively in GitHub – created specifically for fast-moving, software-driven teams.


How do I use ZenHub?

To get set up with ZenHub, all you have to do is download the browser extension and log in with your GitHub account. Once you do, you’ll get access to ZenHub’s complete feature-set immediately.

What can ZenHub do?

ZenHub adds a series of enhancements directly inside the GitHub UI:

  • Real-time, customizable task boards for GitHub issues;
  • Multi-Repository burndown charts, estimates, and velocity tracking based on GitHub Milestones;
  • Personal to-do lists and task prioritization;
  • Time-saving shortcuts – like a quick repo switcher, a “Move issue” button, and much more.

Add ZenHub to GitHub

Still curious? See more ZenHub features or read user reviews. This issue was written by your friendly ZenHub bot, posted by request from @s-melnikov.

ZenHub Board

Formalities

In German, there is a difference between "you" and "you". Where "du" is the more personal form of adress and "Sie" is the more formal.

Especially in German-like languages, there is this difference of formalities expressed in the form of adress. Usually, you would use "du", as "Sie" is more related to serious businesses like finances, politics etc.

Which should we use?

Please add in the Contributing.md what style of language you'd prefer after we decided.

Thanks

Integrating the Riot Cheatsheet

With the release of 3.0.0, I was offered to implement my privately maintained riot cheatsheet directly into the github page. See #152 (comment).

I'd love to know further implementation details and conditions.
Is it just a link to the gh page? Do we want it to have it maintained via this repo?

Thanks in advance.

Use of Component package manager

This is just a heads up, but I think the Component package manager project has been deprecated for a while - see issue 639 on their site.

Although it will still work, it may be worth pointing out to people that this package manager has been deprecated? Even better, I would say remove links to it; those who have links can still use them, but for new users, it is probably better to use NPM or Bower?

The migration guide leaves a few points open

  • Since name and id for selecting elements is deprecated - does the user have to use ref="example" for his subtags too, to access them in this.tags.example?
  • Now that spaced events are not supported anymore - is listen to * gone too? A short notice would be nice.
  • No update before mount: this leaves open for interpretation if riot fires it AFTER mount or not at all.
  • "Scoped css by default" - means you can disable it back on?

"each" example for custom tags is a bit confussing

I've found a bit confussing the documentation of each for custom tags.

<todo-item each="{ items }" data="{ this }"></todo-item>

Set the values on each element of items to the context of the tag (this) as it's mentioned; if any other html attributes is provided then they are set as a property in opts as Riot tags operate.

The example shown in the documentation is a bit confusing due the { this } inside the data; I understand that if you are very experienced in RiotJS is quite straightforward to understand but I don't that it's clear for new commers

I'm wondering if that I'm saying here make sense and it does I will send a PR with a bit more explanation in the section.

Lato as default font

Cyrillic-based languages are not supported at default's Proxima Nova font (#30).
I want to switch russian translation to Lato font. But what do you think about set Lato as default font across all site?

Lato font is most similar to Proxima Nova, it's free, have wide languages support.
Also, Lato looks original - Riotjs.com will not reduce its uniqueness.

Please, check, your language, and note, are you agree to switch at Lato?

agree / maintainer

Attention! Use Lato v2 from latofonts.com because of Google fonts version is obsolete.

ja/v2.3.12

I've made a new branch ja/v2.3.12. Feel free to send your PR to it :-)

Notes

  • Pls be aware that we've skipped ja/v2.2.4 #19, so there could be some inconsistency between versions.
  • The PRs on ja/v2.2.4 is already merged into ja/v2.3.12

Document Translation Guide (draft)

Basically, take it easy. Just pls follow the convention of originals :-)
Here's some points I found while translating them into Japanese. I hope it would help someone.

How to start:

How to check the site locally:

See Jekyll document. Don't worry, easy steps. Basically just two:

  • $ sudo gem install jekyll
  • $ jekyll serve at the root directory of this project.

How to manage it continuously:

  • We're discussing about Tagging and branching convention.
  • Don't work hard alone, invite your friend as a translator or a reviewer.
  • Make a team for your language!

cc: @aMarCruz @Centaur @MartinMuzatko @narikei @tipiirai

Japanese documentation

I've just started the branch ja.
https://github.com/riot/riot.github.io/tree/ja/ja

This branch is WIP yet, but I'd like to finish the translation in a few days. Any feedback and PR to ja master ja/v2.2.4 branch is welcome.

  • トップ:
  • 比べてみる:
  • FAQ:
  • ガイド
    • カスタムタグ:
    • コンパイラ:
    • アプリケーション設計:
  • API
    • カスタムタグ:
    • コンパイラ:
    • オブザーバブル:
    • ルータ:
    • その他:
  • ダウンロード:
  • フォーラム:

cc: @narikei @srockstyle @tao-s

Roadmap

I would be interested in supporting this project. Please, add roadmap section to your readme. For me and other people can help it :)

Server Side render

Regarding http://riotjs.com/guide/#server-side-rendering
The following sentence implies that there are problems and that features, other than loops and conditionals are maybe not supported?

Loops and conditionals are supported.

It would be nice to see why it was decided to highlight that these two features that they do work.

[tip] add a vue js comparison with riot js on the http://riotjs.com/compare/ page

[tip] add a vue js comparison with riot js on the http://riotjs.com/compare/ page.

I am not an expert in either framework, but I think vue js single file components looks very similar to riot js tags.

A link to vue js single file components:
https://vuejs.org/v2/guide/single-file-components.html

An image of a vue single file component:
vue_componentnew

This is just a suggestion for adding a comparison between vue js and riot js on the riotjs.com/compare page. I can not write it, because I am not a riot expert, and I have little experience with vue js.

es/v2.2.4

Spanish translation for v2.2.4 is 99% done.

Cyrillic font support

Russian translations was started #29. At site used font "Proxima Nova" which suports Cyrillic, but in some reason, renders it not correctly. Sans-serif applies instead.

bb90990be5

Some dead links in `zh/guide`

Nearly every anchor point is failed. For examples:

自定义标签示例 -> 预处理 -> 预处理器
循环 -> 上下文 -> 标签实例
加载 -> 如何使用 jQuery -> 标签生命周期

Maybe it is a bug of MarkDown or Jekyll.

Restore translated pages

A lot of external pages refer to the url like http://riotjs.com/ja/api/observable/, but these pages has been moved to under http://riotjs.com/v2. So we may get 404.
GitHub Pages doesn't support redirection, so I think we need to simply restore the translated docs back, and mark them v2 obviously in some way.

@GianlucaGuarini thoughts?

Fixing Forum link-images

Hi there!

For some time, the forum images next to links were okay, but since a couple months ago ( I think since August 13th ) the Images are now displayed as block:

pleasefixthis

(see #main img - display block and margin 0 0 1rem )

I wanted to look up when exactly this change has happened, but couldn't find it in the history of style/_base.scss

This really bugs me everytime I see this. Thanks in advance @tipiirai , you really should visit the forums more often 😋

ja/v2.2.4

It's time to catch up Japanese docs to v2.2.4!
I've made a new branch ja/v2.2.4. So feel free to send your PR to it.

  • Drop IE8 1dfa717
  • Minor changes 4bb13d2
  • Home page fixes 7d7b85b
  • Fix grammar/style and add scoped css to list 9a9af8b
  • info regarding the usage of underscore-prefixed variables 8a395d8
  • Correct guide/index.md typo 4c1107f

Proposal: separated repo for translations

Hi all. I'm thinking about purging all our translations from this repo and moving them into new repos for each.

Why?

We're translating the doc v3 into Japanese, and getting done almost. But it was hard to read the diff of v3.0.0 from v2.3.18 (<--pls click this link). We needed only the English part, but all our translation was included. That makes it so hard to pick the part which needs updating.

Solution (proposal)

Adds five new repos for translated documents:

  • riot/riot.github.io: English only, simple.
  • riot/es: Spanish translation (new repo)
  • riot/fr: French translation (new repo)
  • riot/ja: Japanese translation (new repo)
  • riot/ru: Russian translation (new repo)
  • riot/zh: Chinese translation (new repo)

The good point is that we don't have to change the url even though the repo has been changed.

@riot/collaborators @riot/core-maintainers any feedback is welcome!

ru/2.3.1

Docs en/2.3.1 is released. It's time to update translation!

Proposing a new intro

Based on the current issue here: riot/riot#1238 (comment)
I thought about writing a tiny intro for the riot book, which appeared to be liked by @tipiirai a lot.

You can find the raw draft of the intro here:
riot/riot#1238 (comment)

I'd love to invite you to think about this too for a minute or two.
TL;DR is at the bottom.

Lets have a look at the original intro.

Why do we need a new UI library?

The frontend space is indeed crowded, but we honestly feel the solution is still “out there”. 
We believe Riot offers the right balance for solving the great puzzle.
While React seems to do it, they have serious weak points that Riot will solve.

So — here’s why we need one:

the new intro is based on these thoughts:

Developers worldwide have problems writing web-apps, so they inadvertently flood stackoverflow or other forums.

As riot already says in the intro: we honestly feel the solution is still “out there”.
But how is riot "solving the great puzzle" ?

Every developer has his own dream of writing code.
Is it being organized perfectly, having great tools to rely on or having an easy and comprehensible API.

When I first started to learn javascript, I got cought up in template rendering and eventhandling very quickly. My first app was a mix of handlebars templates and css-selector-attached events.
At that time, we used angular at work and I was really upset about not really getting it.
Then after browsing webappers, I found a description that got me intrigued about js frameworks again.

Riot is against the current trend of boilerplate and unneeded complexity. We think that a small, powerful API and concise syntax are extremely important things on a client-side library. 

That description spoke to me, and it gave me energy to start learning something new. Riot kept it's promise: easy but powerful. Soon after, I wrote games, a video-editor, several interactive menus etc.

Current proposal

I feel that the current intro of Riot isn't as intriguing as it could be.

So here is my current proposal:

Why is Riot for you?

You don't only want to get stuff done quickly, you would love to code without nitpicking about the usual roadblocks: eventhandling, dom selections, template rendering and the list of problems grows with the complexity of your project.

Riot was created to serve you as worry-free and agile way of developing apps with all the freedom you desire.

No more begging for answers for your problems on Stackoverflow.

While Riot offers solutions for important parts of your app, you still get to decide the architecture, behaviors, pre-processor, or other tools.

Even a newcomer to JS can quickly get into the few API methods and write apps today.

What is Riot not?

Not every tool is for every developer. Ember and Angular are pretty complex and often not comprehensible for beginners, but they aim to offer more features.

While Riot handles the most important and essential problems, the original javascript logic are decisions left to the developer. Although the freedom is something to be handled by the developer, to create complicated apps, a bit of background js knowledge is still needed.
Juggling around with objects, arrays, event data and especially organization
is still up to you.

about this book and it's examples
Riots freedom lets everyone write their software in any way they want.
You can use as much or as less of riots tools.


Feedback is very much appreciated.
Thanks!

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.