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

Save draft #1352

Merged
merged 7 commits into from
Feb 21, 2024
Merged

Save draft #1352

merged 7 commits into from
Feb 21, 2024

Conversation

ptbrowne
Copy link
Collaborator

@ptbrowne ptbrowne commented Feb 20, 2024

  • Reduce flickering the 1st time we save a draft (not changing the page)
  • Correctly saving published state the 1st time when we first create the config : I had not seen this because I had first put published state's default as "DRAFT" in Prisma schema locally, then had changed it to default=PUBLISHED without running the migration. Then on test, the default was PUBLISHED and I could see that at creation time, published draft was not taken into account. After running prisma migrate locally, I could reproduce the bug and fix it.

Copy link

vercel bot commented Feb 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 1 unresolved
✅ 1 resolved
Feb 23, 2024 3:34pm

published state was not saved correctly before the 1st time we would save
in draft.

I had not seen this because I had first put @default=DRAFT in Prisma locally,
 then had changed it to @default=PUBLISHED without running the migration.
Then on test, the default was PUBLISHED and I could see that saving in draft
would not work for the 1st time
After saving in draft, save locally instead of switching page
Copy link
Collaborator

@bprusinowski bprusinowski left a comment

Choose a reason for hiding this comment

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

Code looks good! 👌

Not related to this PR, but while playing around with the feature on TEST I noticed that I can't edit the charts I created some time ago (see video). It looks like there's a need to apply migrations to chart config for every action we do (View, Edit, ...) 👀

bug.720p.mov

@ptbrowne
Copy link
Collaborator Author

Thanks Bartosz, I created another issue for this. Since people do not have charts yet, I also think it is not too much of an issue 😅 .

@ptbrowne ptbrowne merged commit e5cfc5e into main Feb 21, 2024
4 of 7 checks passed
@ptbrowne ptbrowne deleted the fix/save-draft branch February 21, 2024 08:11
@bprusinowski
Copy link
Collaborator

@ptbrowne yup, but if they start making them now and we introduce a new property in the config, it will become an issue in the future 👀 Thanks for creating an issue 🙇‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants