Bric Dev Questions

Ok, I’ve poured over the Bric Builder & custom blocs & of course, I have a bunch of questions & comments, so here goes :wink:

  1. Suggest moving Extension Manager to Brics menu - why? - most users will shy away & be afraid to touch anything in Dev menu - it’s just human nature :wink: & it’s important that they use it. OR for ease of installing a custom bric - suggest drag & dropping new bric onto Bloc icon to install it.

  2. Can we have an indicator in Custom Brics Toggle, so we know at a glance whether it’s on or off? Same suggestion for moving to Brics menu.

  3. Tried to create a new bric by changing some keys in an existing bric in Bric Builder & then compiled w/ unique name to desktop, then used Extension Manager to bring into Blocs - but the Title & Author & other keys reverted to orig stuff. Should we create new brics this way or only use the plus button in top-left of Bric Builder to create new brics?

  4. How do we access all the various folders of a custom bric? Ie. where are they stored? - would be nice to just use finder to right-click & ‘show package conents’ to add/delete & edit files as we work on a bric.

4b) Related to previous question: Resources tab: Is the top panel for js & css files, ie what goes in ‘includes’ folder (please label) & is the bottom panel for static assets like images, ie. what goes in ‘resources’ folder (please label) ?

  1. Are you going to have a pane for the edit-mode stuff (js)? Also, would suggest you change this name to ui or edit or something that isn’t confusing, as I can easily see publish stuff being put in this folder by mistake.

  2. How do we set up bric.css file? Is there a pane I’m missing?

  3. In HTML, what are custom-bric-id-target=“true” & custom-bric-class-target=“true” ?

  4. Need control types: Slider w/ option for integers or floating numbers, Color well for assigning colors to anything.

  5. Dropdown: Would be good to assign a visible ‘title’ to each element that is separate from the ‘value’, Ex: display:block/none, Titles: Show/Hide & Values: block/none

  6. Button: Need indicator that is has been selected, maybe an outline around it

  7. Multipart Buttons: with icons, please.

  8. Icon/Cursors pane: Could you please add the sizes below the name of each one. I assume that icons are shades of white on transparent bg & cursors are black w/ translucent white outline on transparent bg.

  9. If we use the same titles such as Appearance/Animation have the same color box render to left so it’s uniform across all interfaces.

  10. Wondering if it might be easier for users if custom brics were a color, such as a blue from the bloc-extension.icns Then users, if looking for custom brics, could scan across white till they see blue.

  11. I know jQuery is available to published page, what about other libraries like font-awesome that are available in Icon Font Manager?

  12. And finally, but probably one of the MOST important things is a way to write attribute values out to html/css/js files. Basically a baked in string replacement capability. Maybe Mustache templating script or something similar

Thanks, Bill

1 Like

Thanks for taking the time to feedback, some great points :+1:.

  1. Good point I’ll sort this.

  2. Yes, I plan to add a list of each bric on page so you can toggle them off individually kinda like app plugins.

  3. Bric ID needs to be changed not name.

  4. Right click the bric item in the left side of the Bric Builder. Show in finder.

4b. Info bullets at edge of fields explain. This is also essential reading regarding structure.

  1. Sorry not sure what you mean.

  2. There is, I plan on adding that.

  3. Those are the objects you want the standard blocs ID field and classes field to apply data too.

  4. Yeah defo coming, I’ll get a little road map up here soon with all my todo items.

  5. Not sure what you mean, titles go in as a string and the selection index integer is passed to your function so that logic is not stored in the actual UI object, write that part in JS function that is connected to drop down.

  6. Not sure what you mean, it’s not a toggle. Just a standard click button.

  7. Segmented controls are on todo.

  8. Good point I’ll add that.

  9. Maybe, I might be adding access to the core features from Blocs so no need to re-add this manually.

  10. Hmm, maybe.

  11. Yeah they should, I haven’t tested that so blocs might not know to include on export if the dependency only appears in the custom bric HTML

  12. Yeah defo something for the future.

1 Like

Hi @Norm
Been waiting a long time, so a lot to talk about :wink:

#2. ‘Warning Will Robinson’ there’s going to be A LOT of them eventually, so if all are shown in main menu, could be quite unwieldy. My comment was if you could show checkbox or some icon in menu to make sure they are shown in brics view OR maybe move that to Drop mode pane where it would be more directly relevent.

#3. I tried changing id, and even saved it, then compiled & then brought it back in - didn’t have saved id or other changes - I guess the only way for now & probably the best way is to just start w/ top-left plus button which creates from template & then make changes.

#4. Right-click in Bric Builder on brics to the left: Doesn’t Work

#5. If you leave the edit-mode folder name ‘js’ - that’s going to cause confusion for devs - would suggest a folder name of ‘ui’ or ‘editmode’ or something similar.

#7. Can you give an simple example of how to use those - still pretty shaky on what that would be used for.

#9. ‘selection index integer is passed to your function’ Oh - really. Is it zero-based?

#14. I think it would be visually a very nice touch.

#16. All the UI API’s are currently for edit mode only. There HAS TO BE a simple API feature from the start, that let’s us write out values to published html/css/js files, otherwise we can’t set any options for publish!

Simple Example: Plugin js file that’s in ‘includes’ folder has a variable that needs to have value set. myvariable = [true or false] So we need a way to be able to write either true or false to the value - Hope that makes more sense now & of course there can easily be dozens or even hundreds of these in a typical custom bric.

To Help YOU Prioritize What’s Critical (IE. we need right away): #4, #6, #15 & #16

I can’t wait to start using it :smile:
Thanks, Bill


For me #4 works. Which version of macOS do you use?

I’m on macOS 10.12.6

  1. Yeah they won’t be shown in this menu, it’s likely there will be a sub window of some kind.

  2. In Blocs you use the ID and classes fields to apply ID and class data to an object. You can do the same with a custom bric. But you use these attributes to control which part on your Brics dom gets the ID or class applied when a user inputs data into the ID and Class fields when your Bric is selected. So let’s say you have a group of images, you can set the ID and Class fields to only apply data to the main container rather than every object in the Custom Brics markup. Hope that helps.

Regarding 16. Just store this data in the html as a data attribute then get your JS to check that. That way various Brics can use the same JS but apply different values to your JS function. What you are suggesting has a use case I agree but for values like bools etc, I would make your code less ridged and store required user data as an attribute on the Brics actual HTML output. I use this technique on the Blocs form validator to handle the custom messages, it means various forms can run from a single js file, I just pluck the relevant message data from the items designated data attribute.

I’ll also check this as it all works for me. In the meantime go to Application Support/Blocs 2/brics you will see all the data there.

1 Like

#17 PHP file support (Essential item)

As we are starting on a green field, and Norm has enough time do do it the right way, I don’t think there is something “critical”…

1 Like

Yes let’s use the term ‘essential’ I feel it’s better suited.


Do you mean php pages that you can bundle with your bric for inclusion on export?

Yes, and I changed to essential :wink:

1 Like

How is this type of thing managed on other platforms you develop for?

Well, in Stacks, we simply, point to a folder or file & mark it as an asset & it’s published as is.

Are you able to control asset inclusion based on a stacks options or is it just a file dump regardless of options?

It’s by a plist for the stack. Here’s a simple example where the first ‘easydbtextgrid’ is a folder in my stack - so everything in that folder is published & the second is a particular file ‘easydb_blank.png’ which is published. I’m thinking we could do something similar in your panel control.
So if I had other files in the stack, but didn’t assign them assets, then they aren’t published.

1 Like

In general it is the same thing, as we already startet discussing here: Where to put php files, which should be exportet