-
Notifications
You must be signed in to change notification settings - Fork 13
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
Version 3.0.0 breaks on Studio refresh, also prevents applying Presentation, also still uses out-of-date Studio in apps #154
Comments
[ n.b. While what follows covers the proved solution and aspects to implementing for issues raised here, I'd like to smile and invite to skip over it, to read the little story below first, as it could cut the need to do most of what is here. ] The issues raised above are resolved, in working devs and sites, with ordinary Studio operation returned, including also full and quite nice operation of Presentation. That part's been helped along by some of its fixes coming through at end of this week -- kudos and thank you, to the attentive team. The Presentation portion boils down to needing to continue to operate in hybrid server mode, while depending on careful workarounds for the issues raised by making ordinary Studio possible without hybrid.
For this second point, I've provided a working example tried out for Netlify, and others like it will need to be explained with example, for each platform to use the new release of this package. It's yet to be documented. The second point is also a requirement for ordinary Studio operation on the new package, as otherwise a simple browser page refresh will result in a blank 404 instead of a fresh view, as has already been noted by persons with careful intents. The workaround for that does put you back on the correct Studio page that had been open, even though it would appear not to; this is no doubt due to state that the Studio keeps to assure this. I know I've been long-winded here, but there are a lot of moving parts, for such a simple-seeming package, and it seems worthwhile to note those turning up as important ones here -- beyond that, apologies..... |
Well, some time away and after the work today, and writing it up here, it seems I should say what I've been thinking -- that it would be both the kindest and the most useful, as I think it's the more accurate picture.... In software, there's often a tendency to do something, isn't there, when you see it can give a little enjoyment, a feeling of being 'neat', or another even better and conversational word one of my Norwegian uncles loved to use, with his very accurate English. But often enough what can feel clever isn't quite the most practical, and can make over-riding requirements, particularly on persons using it, isn't it also so.... I'm afraid this is how I found I was feeling about the added feature in this release, which arranges that the Studio can be provided, in some cases, without using an Astro hybrid adapter. Sounds good....maybe...and if there's some suggesting reason I may not be aware of, but it shows to have a daunting downside, that as described above, we have to assure that every designer to use it adds a tricky selective redirect to their overall web system, or run into trouble with the Studio. They'd need to understand well enough to do this while remaining accurate to that system, with the care not to interfere with other functions its own redirects have, usually assumed as automatic and used for business purpose, not just technical handling. And if you don't get it right, on the Sanity side the result will be quite off-putting, things persons really don't want to see. Page refreshes that send users to 404, link actions that, instead of expected transitions, open non-functional extra windows which can't obey the complicated URLs they show. I was reckoning myself, that something deep in Sanity's design had been disturbed, if now well understanding how those results could come from something much more light weight in itself and external. I just don't feel we want to have these things happen to people, especially those who are drawn to Astro for its promise of easy, efficient constructions arranged around Sanity's abilities. And especially not in the way these problems act, which multiplies in seriousness when the fine privilege of Presentation is added to their offering. Without leaning on that, isn't it just a question of worth? What and for whom would 'sometimes no hybrid' buy -- vs. having an easy to establish and maintain system, which feels entirely reliable? So I'd like to suggest we nod quite respectfully towards person or person who invented this...and not use it, remove the temptation from this package which without it is the strong foundation to all the easy entries we can offer to persons who will enjoy Astro and Sanity's benefits together. I suspect there would be a rather profound feeling of relief, and opening to possibilities, in this - for one person's opinion anyway, after seeing the alternative :) Coming back to this even a bit later, of course it's possible that there's a request or reason for the addition that I haven't been aware of, so it's now mentioned above. If that's so, then maybe a good answer would be to have two versions of sanity-astro. For the many, simply using Astro's installer for an adapter, and setting it to hybrid, would surely be more easy and acceptable, than being required to work out and assure a special redirect that must fully not disturb the rest of their site. Missed links are, after all, a marketing opportunity for many sites, and their responses wouldn't like being disturbed. In any case, my intent has surely not been to come on too strongly; just to offer from a sense of judgement that was speaking, built up over experience. I'll hope that can be helpful here. |
Hey there! Thank you for your feedback. We're working on a fix for the |
hello - yes, of course, thanks. I pin 2.21 and recommend it to others. Interested in what you may come up with here -- maybe that will change the feeling it's one of those reaches afar of a justification? And as mentioned, where I really need this package, must run in hybrid anyway.... |
Hi there! I'm pretty sure all the issues outlined here are more-or-less resolved by now.
Could you update your |
Hello Christian, thanks for letting me know -- and I'll be happy to have a look at this, on several counts, certainly. Appreciated, |
@christianhg Christian, I'm a bit exhausted after a long day with this, but I want to say that it feels you, and anyone working with you on this, have done very good work.
The last point is a very nice one to discover, I think, even though it highlights a problem. It is that in your framework, which has almost nothing in common with mine, I find exactly the same issue I've given a detailed report on, in visual-editing. So we can be confident now, I think, that it will appear in any Presentation system, and so will get its due attention, so that Sanity's accomplishments become even smoother. Again, Christian, this is good work. I'll look at it further on the points which were of interst before, for ease-of-use by 'normal persons', those who want to build things with Astro, and that opportunity for Sanity. I suspect today, though, that you and any persons working with you have quite helped open that door. Best, p.s. a little extra kudos, you can find here on the Sanity Slack; maybe something useful also to come |
should close this, I think, but we can continue to converse, as may have things to offer.... Cheers, Christian... |
@christianhg Christian, I've just put up a fully Presentation blog addition, on a fork so it can be used when appropriate -- at the least, there are some things I'd like to improve in detail features, but it is working very nicely indeed with your code :) You can find it here, the branch on the fork, may find use of the Readme inside it, and if you like, I've put an availability notice on the #astro at Sanity Discord. But on this weekend, family time it definitely is :) Take care, |
There are two direct error facets here, which I suspect are rather related, as both seem to have to do with Studio's operations with paths.
though the Studio appears to operate at basis with this release, it fails immediately with 404 Page not ffound, when doing a browser page refresh -- even for its entry page, at present /admin/desk with the default configuration.
on first attempted employment with the sanity-astro-presentation package, operating in alpha as it has very reliably for months while using the 2.x @sanity/astro package, Presentation fails entirely, indicating path problems in several ways besides the above.
To Reproduce
Just bring up the apps/example project in the 3.0.0 repo, having built the encorporated package, assuring it operates. Then if you don't have Studio permission to its default project, reconfigure to a project where you can, potentially duplicating the dataset, or as I did, importing schemas and a simple page to work with your own.
Once the site is up, go to the Studio at /admin by default, and note the Studio apparently operating. You can try entering pages there, but the problem will show even on the entry page, which show the replaced url /admin/desk.
Then refresh the Studio's browser page. You will get a 404 Page not found, regardless which Studio page you do it from. That's the entry point to errors here, and solving it may solve others.
Expected behavior
Expected behavior would be to show the current Studio page again, without issues.
Further issues
This initial 3.0.0 is continuing to use the Desk implementation of Studio, but this is now well out-of-date, so it's suggested this be updated to the Structure Studio version. Astro has just as much need as any to stay current, and Structure is used in the Presentation ability that's coming.
I did in fact quickly convert a copy of the apps/example to Structure; it operated with nothing added to the errors reported for Desk.
As indicated from initial trials, this 3.0.0 version will fail entirely to allow Presentation, in the Sanity Astro Presentation which has been using variants of the 2.x versions very reliably. The failures all take the form of not responding to or using Url paths correctly.
My thought is to see the basis issue repaired, and try again, which I will do rapidly on given access, or could for intermediate trials on a road to full repair..
If we come to need for it, there is an alpha release of the Astro Presentation capabilities operating, including loadable data for using its demonstrations, where access could be provided to work out any further issues should they appear.
Which versions of Sanity are you using?
$ sanity versions
@sanity/cli (global) 3.34.0 (up to date)
@sanity/astro 3.0.0 (up to date)
@sanity/image-url 1.0.2 (up to date)
@sanity/vision 3.19.0 (latest: 3.34.0)
What operating system are you using?
Windows 11 very latest, well maintained
Which versions of Node.js / npm are you running?
$ npm -v && node -v
10.2.4
v20.11.1
Security issue?
No security issues
The text was updated successfully, but these errors were encountered: