Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New branching workflow #3953

Merged
merged 84 commits into from Jun 27, 2023
Merged

New branching workflow #3953

merged 84 commits into from Jun 27, 2023

Conversation

logan-anderson
Copy link
Contributor

@logan-anderson logan-anderson commented May 19, 2023

Demo: https://www.loom.com/share/9f4f36a264e24be8a9d1c7b2008a1255
Fixes ENG-921

TODO:

  • Get Default branch from tina cloud?
  • Decide if we want to the user to provide a list of protected branches
    • do we enforce this on Tina cloud?
  • Decided what to do while waiting for indexing.

@linear
Copy link

linear bot commented May 19, 2023

ENG-921 Prompt user to create branch when making a change

Similar to our Hackathon POC, if users have opted into "editorial workflow", upon clicking "save", if the user is on the default branch, we should intercept the action and prompt them to create a new branch.

Wireframes (WIP):

Tina Git Workflow Wireframing - Saving To Locked Branch.png

  • "Save to new branch" also creates a pull request
  • Branch name should be prefixed with tina/

For reference, here's the POC:

https://www.loom.com/share/536b98e4f888492ea833e8a9200dc13b

@changeset-bot
Copy link

changeset-bot bot commented May 19, 2023

🦋 Changeset detected

Latest commit: d6149d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@tinacms/toolkit Patch
tinacms Patch
@tinacms/app Patch
@tinacms/vercel-previews Patch
starter-basic-iframe Patch
starter-empty Patch
e2e-next Patch
@tinacms/self-hosted-starter Patch
kitchen-sink-starter Patch
@tinacms/starter Patch
@tinacms/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jamespohalloran jamespohalloran added the tagged This PR should be given a tagged release label Jun 5, 2023
@logan-anderson logan-anderson changed the title New branch model New branching workflow Jun 6, 2023
@logan-anderson logan-anderson marked this pull request as ready for review June 16, 2023 14:15
@logan-anderson logan-anderson requested a review from a team as a code owner June 16, 2023 14:15
Copy link
Member

@jeffsee55 jeffsee55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels really good, just had one issue with the branch not getting the tina prefix

}
}, [currentBranch])

const handleCreateBranch = React.useCallback((value) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2023-06-21 at 10 21 04 AM

The prefix here doesn't actually get applied to the branch, testing it out with input "hello", just creates a branch named "hello" instead of "tina/hello"

Note that this does work as expected when prompted after saving

Screenshot 2023-06-21 at 10 27 46 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeffsee55 Good catch, should be an easy fix.

@jamespohalloran
Copy link
Contributor

jamespohalloran commented Jun 21, 2023

After you delete a branch, from the collection list page: (e.g /admin/index.html#/collections/post/~). This correct modal flashes for a second:
Screen Shot 2023-06-21 at 5 47 18 PM

but then is replaced by the more ambiguous modal:
Screen Shot 2023-06-21 at 5 47 22 PM

@jamespohalloran
Copy link
Contributor

When you kickstart the editorial workflow through creating a document, it lands you back on the empty create-document page, (even though the document has been created):
Screen Shot 2023-06-21 at 5 40 26 PM

@jamespohalloran
Copy link
Contributor

"Create Branch" workflow from the branch modal doesn't work, we talked about removing that for now:
Screen Shot 2023-06-21 at 6 27 45 PM

@jeffsee55 jeffsee55 merged commit 1c0cc45 into main Jun 27, 2023
7 checks passed
@jeffsee55 jeffsee55 deleted the new-branch-model branch June 27, 2023 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tagged This PR should be given a tagged release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants