Comments (5)
I think even with the sandbox this would still be pretty cumbersome. In addition, most of the things that you can do with Jinja would break in the setting, so it would still only solve half the problem. My plan for this is instead to allow pointing a course within a locally-running relate instance at a directory rather than a git repository. That way, changes can be immediately previewed right after the files are edited. This does not enforce validation, so there's some room for errors, but I think overall this is the most promising solution. What do you think?
from relate.
I think your idea is great, at least for me.
In fact, my original intention to raise this issue is to make it easier, although it is actually not easy :-), for my colleagues who wish to use my relate instance to develop their courses. Your idea is great, but that requires users to set up local developing env on their machines, which is not so realistic for my colleagues.
from relate.
Here is an alternative idea: we build an IDE -like interface with a file browser on the left and an editor on the right. (We have already got code mirror and jstree, so the parts are there.) This can be popped open in a separate browser window, and a user can then edit the site "live" in some sort of preview mode.
This would entirely remove the requirement for the user to have local development environment of any sort, and in addition it would allow relatively immediate feedback on edits.
There are a few things that are unclear to me about how to do this, but I feel like all this is resolvable:
- First, relate would need to start working as a more full-featured git endpoint, not just pulling changes from elsewhere, but also being able to serve a git tree so that changes made within relate can get out. It's actually easier than it sounds, because Dulwich can be made to do the hard work. As a matter of fact, they already have a Web server that would just need to be glued into Django, with some manner of authentication.
- Each save operation would likely generate an intermediate commit. I imagine that per user we would have to save their current "edit base commit", and all the edits on top of that would then become part of the next commit that they likely would have to issue explicitly. Each save on the other hand would likely only generate a temporary commit that gets replaced by the next saved state.
- One thing to figure out would be what to do if two users make conflicting changes. My inclination would be to let people fetch both git revisions and then sort out the mess themselves on the command line.
- Another question is how this would interact with validation. One slight issue is that validation can take a few seconds, which takes away from the immediacy of the edit-save-preview cycle. On the other hand, some parts of relate may be considerably unhappy if they run on unvalidated data. Maybe validation can be made fast enough to not hamper this too much.
from relate.
Wow! What a great idea. I like the idea of commit upon save
using Dulwich. I have not explored deeply into Dulwich package, although I've implicit expected that utility. Your idea is much further and more considerate than mine. If that can be applied, I think it's quite possible that course developers can use pull and drag to edit their course content, which will also reduce validation work, and lower the barrier for Relate user.
from relate.
https://gitlab.tiker.net/inducer/relate/merge_requests/62
from relate.
Related Issues (20)
- Page sandbox should confirm close
- Calendar shows different dates for all-day events when viewed from different time zone
- Support binary in number parser
- Sandbox should do YAML processing
- Vertically resizable text areas HOT 1
- Make an option to make exceptions session-specific
- Lies to students about "staff being informed" if nuisance failure
- "Container crashed" may be interpreted as nuisance failure
- Inline multi question: "families of solutions"
- Make a way to remove no-longer-good enrollment preapprovals
- add arbitrary HTML to new course setup HOT 1
- poetry install stuck on Ubuntu 20.04 + machine HOT 1
- Preview should be per-session, not per user
- Code question doesn't support Non Ascii Characters in code on Windows HOT 2
- Code question: support `answer_explanation`
- Sample course content broken with restricted HTML
- Not-filled-out point spec causes confusing error
- Points spec parse error should remove points value in auto-points-tally
- Float evaluator does not understand `pi`
- Could use `import-linter` to enforce structure
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from relate.