Singleton Document Setup is Complex + [BUG] Its is still repeatable
See original GitHub issueDescribe the bug Creating a singleton document is really hard in Sanity. Just to make it non-ropeable, I had to create extra files & hours of finding proper docs, asking in the slack community etc.
To Reproduce
Steps to reproduce the behavior:
- Try to make a singleton document from scratch and see how complex it is.
- Click on the Top Edit button (Top-Left: just after name )
- Now click the option to add Document
- Click on the Singleton Type created
- We are still able to create new one
Expected behavior
It should not be able to add an array[] if its singleton, Also the configuration should be as simple using Schema. eg:
"repeatable": false
Screenshots
So, please consider this issue and try to come up with a better solution.
Thank you. ~Surjith
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:9
Top Results From Across the Web
design patterns - So Singletons are bad, then what?
It's important to distinguish here between single instances and the Singleton design pattern. Single instances are simply a reality.
Read more >How singleton pattern works with Golang - Medium
In this article, I will present two ways to implement Singleton using Golang, the “Not Thread Safe” form and the “Thread Safe” form....
Read more >Using module as a singleton in Python - is that ok?
I'd just spell the varibale in all_lower (ALL_UPPER denotes a pseudo-constant) and prefix it with either a single ("protected") or double (" ...
Read more >Top 10 Most Common Spring Framework Mistakes - Toptal
In case you are not very familiar with Spring Boot but would still like to try out some ... Consider a Spring project...
Read more >Advanced googletest Topics
This document will show you more assertions as well as how to construct complex ... GTEST_SKIP() can be used in individual test cases...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s been a year since this issue was created and Sanity still doesn’t want to make the process any simpler? What a shame! Might have to consider another CMS if convenience is not Sanity wants to offer.
@pexeixv I’m with you. But believe me, Sanity is the best CMS apart from these minor issues.
Now I can create singleton in 5 minutes even though its a hack. I’m used to it.
Steps:
Here’s how the code looks like: https://github.com/web3templates/stablo/blob/main/studio/schemas/siteConfig.js