Coder Social home page Coder Social logo

crated's Introduction

Crated

SEA layout renderer prototype in Python.

The day will come ; wherever it may occur.

As the inherited debt ascends and flees, the jay will softly land upon us.

crated's People

Contributors

d-maxwell avatar

Stargazers

 avatar

Watchers

 avatar

crated's Issues

Relative positioning

  • offset element by propagated parent offset position -- 2Brewritten (ugly ass code)
  • implement origin
  • implement anchor ?

origin : placement relative to the parent container
anchor : self alignment, determines from where the object should scale as well as other potential transformations

Should everything be centered by default ?

hook() function

The ship() function currently returns nothing but selectors. In the end, its aim is to return all of a crate's attributes.

Selectors

Crates may be selected by their :

  • Tag
  • Id
  • Class
  • Eventually by their any of their attributes
  • State (pseudo class like)

This function generates Crates, thought at the moment it does so without any of their arguments.

Why are ids a thing ?

While conceptualizing Crated, I heavily took inspiration from HTML, and more specifically, from its element classification.
In HTML, an element may be accessed by its tag, id, or class. As I had in mind a somewhat similar system, maybe even one that could be translated somehow, I set my mind into such a system, without really thinking about the id part that much; which lead me to implement it, (wrongly), despite it not being needed at all.

What I mean by wrongly, is that ids are supposed to be unique; in that case, what would be the point of having multiple ids on a single object? Since no cross-reference is possible (i.e. two objects sharing an id), might as well join the two ids into one, or make it a class if it is intended to be used by more than a single element. What even is this obsession with singularities? One is just a number, a value, it doesn't hold much value in this scenario; and for simplicity reasons, as to not over convolute the project, I think I will be dismissing ids entirely, not just their ability to be multiple on a single object. (i.e. storing ids as a list of strings)

In the end, the behaviour of a class can absolutely supersede the use of an id. The only point of ids in HTML is for headers and really just links.
Except, this feature, which is so far the only reason for ids to even exist in the first place, will not be implemented this way into Crated.
I obviously still need quite some time to complete the potential implementation of links and references, as it is still nothing more than an idea in the back of my mind, and a few notes here and there.

TL ; DR โ€“ Bye bye ids, long live classes !

Rewrite rollback search to be more dynamic

Currently using chained if conditions, could be reduced (or at the very least made cleaner) using dictionnaries and strings as variable pointers, as all this section does is the assign the same expression to a different variable through a slightly different condition each time. This will eventually be reduced.

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.