chrislopresto / ember-freestyle

Create a component explorer for your Ember app
https://chrislopresto.github.io/ember-freestyle
MIT License
269 stars 82 forks source link

Simplify Technique for Including Notes #61

Open chrislopresto opened 8 years ago

chrislopresto commented 8 years ago

There are three separate, related components for including notes in a Freestyle guide: freestyle-notes, freestyle-note, and freestyle-annotation. This unnecessarily complicated approach is a result of quick prototyping. Let's simplify it.

migbar commented 8 years ago

Hi @chrislopresto

First, love the addon, and awesome EmberConf talk! 😄

To simplify the annotation technique, are you aiming at keeping the components but changing public API, or are you thinking of removing/merging them?

I can see that freestyle-note and freestyle-annotation are used as public components to build the guide but freestyle-notes seems to be used privately to implement freestyle-note.

If this is true, I am wondering if we could try to merge the behavior of freestyle-note and freestyle-annotation into one component.

This component could be either configurable (with positional parameters?) or smart enough to know the type of annotation (markdown or HTML) to produce based on context and/or content.

I know this is pretty vague, I'm going to find some time and try put together a quick PR. Any comments or pointers as to where you want to go with it would be really helpful

Thanks! --Miguel

chrislopresto commented 8 years ago

@migbar Thanks and thanks! These are early days, so I think we should remove/merge components to arrive at something simple.

Your outlined approach sounds good at first glance. As we dig in, we should document the purpose and usage guidelines for each of the (hopefully two) components.

As you're able to start digging into this, I will start digging into https://github.com/chrislopresto/ember-freestyle/issues/48 as it's somewhat related. We may as well aim for one compatible set of breaking changes in an upcoming release.

migbar commented 8 years ago

Awesome! Let me see if I can carve out some time this week ...

Samsinite commented 6 years ago

Hi, love freestyle, we use it on every project. This is currently a bit of a pain on our end, people frequently mess up the note slug. Unfortunately, the slug lives on the same level as usage, making it difficult to just implement this using contextual components. What are your guys thoughts on a redesign or iterative change to make this easier to work with? I think it would be nice to have something that just works for the simple use case, but still flexible to provide overrides for other uses that people are also doing.

lukemelia commented 4 years ago

This would be addressed by #340.

lukemelia commented 4 years ago

357 has simplified this somewhat by removing freestyle-note and consolidating on freestyle-annotation. The real fix will be via #340 though.

bertdeblock commented 3 years ago

Can we close this one? I think the original issue (having 3 separate components) is now resolved? I created #613 to completely get rid of the remaining freestyle-note component.