Frontend branch required to add new collection?

Feature(s) impacted

Development workflow, adding a collection, edit layout

Observed behavior

N/A

Expected behavior

N/A

Failure Logs

N/A

Context

It is unclear to me whether I need to add a frontend branch when adding a new collection or whether I can simply deploy the backend and then use edit layout to add it to the layout in production.

I have added a single collection. I didn’t create a branch on my Dev environment. I simply used edit layout to add the collection to the layout. Can I do the same for production?

I was under the impression that a branch was only required for changes to things like related data, smart tables, adding actions, etc. But, I’m doubting because at the top of the page in the UI, it currently shows:
Currently on DEV with 1 change and 0 branches pushed.

  • Project name: scratch-payment-service
  • Team name: Admin
  • Environment name: Dev
  • Agent type & version: …
  • Recent changes made on your end if any: added a collection

Hey @Brett_Belka :wave:

It is unclear to me whether I need to add a frontend branch when adding a new collection or whether I can simply deploy the backend and then use edit layout to add it to the layout in production.

Forest branches are designed to handle what we call “Layout changes” - which are simple and unitary changes made in editor mode (Like hiding or showing a collection, re-ordering fields in the table view etc)

Adding a new collection isn’t considered as a Layout change on our end.
Showing or hiding this newly added collection is.

You can find more info about this in our documentation.

I have added a single collection. I didn’t create a branch on my Dev environment. I simply used edit layout to add the collection to the layout. Can I do the same for production?

Sure, you can also introduce Layout changes directly in production. The thing to keep in mind is that your production environment is considered as a “reference”. This means that any others environments (Remote, devs, etc) will be based on this reference.

Let’s take an example, where you have 2 environments (Development & Production)

  • In development, you add a new collection in your database & on your agent (That doesn’t exist on production) = No layout change, as this is already handle by your version control system
  • Then, still on development, you set it as visible this collection = 1 layout change (Set the visibility of the collection)
  • At this point, if you deploy your code to production (Assuming that now, the collection is available on production), you’ll still not see it as visible on this environment (As the layout change was only applied in development)

You then have multiple choices to set the collection visibility on production

  • forest deploy, available from our CLI tool. It’ll apply all the layout changes from your current branch to your reference environment.
  • Directly set the visibility of the collection from Editor mode.

I was under the impression that a branch was only required for changes to things like related data, smart tables, adding actions, etc. But, I’m doubting because at the top of the page in the UI, it currently shows:

This message is here just to remind you that you are currently on an environment that store layout changes. Until you either forest push or forest deploy, this message will remain visible.

Development Workflow was designed to allow developer to work on features that need both Layout changes & code changes in an isolated manner, allowing them to only release both of the code & the layout in a CI/CD context, without preventing non-technical users to still be able to update the layout when they need.

I hope that’s clearer (Or just tell us otherwise), let me know :slight_smile:

Thank you, @jeffladiray!

It was extremely helpful. I was mostly confused because I didn’t realize that the new development flow could be seen as optional. The final puzzle piece…

Thanks again!

1 Like