Coder Social home page Coder Social logo

Comments (14)

tbb2 avatar tbb2 commented on August 11, 2024 2

@Bjornnyborg I think that's splendid

from novicell-frontend.

Dan9boi avatar Dan9boi commented on August 11, 2024 1

i guess this can be closed due to @Bjornnyborg 's commit?

from novicell-frontend.

Bjornnyborg avatar Bjornnyborg commented on August 11, 2024

@hesselberg also suggested to remove the default markup from the component. Maybe we should just make a div, with the class ".component-name" and render the component name as the only thing inside the div. What do you think @hesselberg and @Dan9boi ?

from novicell-frontend.

hesselberg avatar hesselberg commented on August 11, 2024

I think thats much better.

I've modified the script in our most recent project to do the following:

.config.json:

{
  "title": "Organism",
  "status": "backlog",
  "context": {}
}

.css:
/* Insert css here */

.hbs:
<div></div>

The only thing thats changing is the title in the config file to either Atom/Molecule/Organism/Page, and of course where it puts the files

from novicell-frontend.

Dan9boi avatar Dan9boi commented on August 11, 2024

@tbb2 what do you say?

from novicell-frontend.

tbb2 avatar tbb2 commented on August 11, 2024

What I think would be really awesome is if you can use the component name inside the files like this:

.config.json:

{
  "title": "my-organism-name",
  "status": "backlog",
  "context": {}
}

.css:

/* Insert css here */
.my-organism-name{
}

.hbs:

<div class="my-organism-name"></div>

If not, the suggestion from @hesselberg is fine

from novicell-frontend.

tbb2 avatar tbb2 commented on August 11, 2024

I guess I don't know how to do line-breaks inside code in this text-editor - the line-breaks should of course be as hesselberg's

from novicell-frontend.

Dan9boi avatar Dan9boi commented on August 11, 2024

I guess I don't know how to do line-breaks inside code in this text-editor - the line-breaks should of course be as hesselberg's

I've fixed your markdown now - just added the tripple backticks ```.
You can see here how to do code with syntax highlighting and more...

from novicell-frontend.

Bjornnyborg avatar Bjornnyborg commented on August 11, 2024

I reworked the generator according to your comments: https://github.com/Novicell/novicell-frontend/tree/feature/component-generator-cleaning, feedback is appreciated! :)

from novicell-frontend.

Bjornnyborg avatar Bjornnyborg commented on August 11, 2024

createComponent -t a -n "My Component" generates:

{
  "title": "My Component",
  "status": "prototype",
  "context": {
  }
}

.css:

.my-component {
}

.hbs:

<div class="my-component"></div>

from novicell-frontend.

tbb2 avatar tbb2 commented on August 11, 2024

It's nice! I think it would be nicer though, if you write the class name when you create the component
´´´createComponent -t a -n "my-component"´´´
since that is the most important name for the developer - actually you only see the title from the json file if you're working in fractal.

Whether you want to leave the dashes in the title in the json file or replace them with spaces and capitalize first letter in each word - I don't have an opinion on that...

from novicell-frontend.

hesselberg avatar hesselberg commented on August 11, 2024

The title in the JSON file is just as important, as it generates the title in Fractal. Loving everything else!

from novicell-frontend.

tbb2 avatar tbb2 commented on August 11, 2024

The title in the JSON file only generates the title that is shown above the preview iframe in fractal. The title in the navigation in fractal is generated from the folder name instead

from novicell-frontend.

Bjornnyborg avatar Bjornnyborg commented on August 11, 2024

I updated the generator, now the name argument is used directly as file/folder name, and a capitalized version with spaces instead of dashes, is used as the title. :)

from novicell-frontend.

Related Issues (20)

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.