Code Monkey home page Code Monkey logo

corpuscule's People

Contributors

lodin 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

Watchers

 avatar  avatar  avatar  avatar

corpuscule's Issues

Suggestion: lit-css support in styles / lit-html renderer

I have been following the progress in this repo for a while, so first of all must admit the great work (especially now when I'm looking through the docs). So let me submit an issue.

Looks like the @style is now accepting either CSS file or raw styles. This is handful, but there is an idea on my mind and I'm not sure where to implement it better.

I would like to add support for lit-css, which is a good way of sharing styles in a way compatible with LitElement. It basically can be already used with raw styles.

Here is the example how it is done in styled-lit-element by the same author: https://github.com/lit-styles/lit-styles/blob/6bea874af7f7b0dc5f8f5e5e5095a68c724792b9/packages/styled-lit-element/src/StyledLitElementMixin.js#L18

Questions:

  1. Can we implement memorization similar to what styled-lit-element does via decorators?
  2. Can we have same decorator applied to the class with different values? Use case is to split components styles into multiple layers, e.g. basic styles and "theme"
  3. How do the inherited classes work with decorators? From what I understand, they should be able to help with organising code better than class mixins (used in Polymer)

Add @element decorator

For some reason @corpuscule/element doesn't contain decorator to define custom element. It should be added as @element decorator.

Move `computed` feature to a separate package

Computed feature should not be in the main element package since it is a separate feature that is able to exist by itself. So there should be a @corpuscule/computed package containing this feature

Refactor back to decorators

Due to new decorator proposal coming soon Corpuscule have to be rewritten back to decorators approach (legacy for now), and it should be the single option to work with framework. It moves framework toward to the goal of using the most bleeding edge technologies.

Simplify @corpuscule/element

For now @corpuscule/element has a lot of things that could be easily removed simplifying code and architecture of a package.

  • Remove lit-html Shady Render
  • Remove Scheduler
  • Move computed

Remove lit-html Shady Render

Since Corpuscule is aiming bleeding edge and browser are getting better and better in support of new technologies, the dynamically imported shady-render could be removed. If the shady-render is still necessary, it could be replaced through the simple babel plugin.

Remove Scheduler

React is still working on it's implementation of async rendering and since Corpuscule position itself as a successor to React, it should be better to wait until the implementation is released rather than to introduce half-baked scheduler that does almost nothing.

Move computed

For now computed is @corpuscule/element built-in. That's not good because it has very insignificant connection to the package core. So I believe it would be better to move it to the separate package @corpuscule/decorator-computed.

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.