-
Notifications
You must be signed in to change notification settings - Fork 670
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
974 in-browser document editor #1009
Conversation
@paulsputer Can you rebase on master? |
+ npm required as part of the customized build procedure for shimming + Ant script added for BuildUI which performs npm commands + Imported submodules: + simplemde + codemirror + npm build script ensures only a single common CodeMirror definition
+ Update font-awesome to 4.5.0 + fixes header icon display for SimpleMDE + css z-index adjustments for full-screen editor mode + Initial form submit script and commit dialog in place
Factoring out common JGit code from BranchTicketService for usage with doc page commits + getTreeEntries + commitIndex
53197ae
to
ec38df7
Compare
Just rebased and tested @gitblit |
I think we are missing some pieces here. |
Those files are generated by the buildUI ant task which will need to be run after a submodule update and then it seems an F5/refresh on the project directory in eclipse is required. This buildUI step needs npm (https://nodejs.org/en/) to be installed, so I wasn't sure whether to join it with one of the other build tasks. I had hoped to automate the npm install part by using (https://github.com/eirslett/frontend-maven-plugin) but couldn't figure out the moxie settings to get maven to pull it down. Noticed one ant task does do some js minifying but i'm not aware of a way to get it to do any shimming hence the need for npm which calls the build task defined in package.json. |
Moxie != Maven so we can't get that working. Maybe the problem is my NPM is too old? I'm not into Node nor the JS toolchains. I am running Ubuntu 14.04.
Would it be a good idea to add the output of the NPM process to the repo? If/when the submodules are updated and files are changed then we could commit those changes. I recognize that frontend devs like NPM, Grunt, Gulp, yada, yada, yada but adding a hard dependency on another build system makes it more difficult for initial build setup. |
Ahh that's why.. ok, I hadn't realized that, I'm not that familiar with it - I thought moxie was a convenience tool for generating the maven build files.
It looks that way, you're on 1.3.10 and I believe some of the dependencies require at least version 3. I updated to 3.3.12 when developing this.
Yea that will probably be easier for most development works. I'll add another commit including those files then. |
+ Update frontend submodules to latest release: + Codemirror - 5.11.0 + SimpleMDE - 1.10.0
@paulsputer the editing feature is really cool & very impressive. I'd like to maintain the old doc page, though, and have a link to the editing page or mode. I do not want it to jump right in to edit mode for an authenticated user. I can also imagine people will want this extended to editing any file, not just a markup file like Markdown. What are your thoughts? |
Thanks @gitblit, ok bit of a long one so grab a coffee... :)
Yeah, I was considering to add Happy to add the
Certainly. This PR puts the client side plumbing in place ready for it by providing a single version of CodeMirror. Other file types would display the CodeMirror interface (with syntax highlighting etc) rather than the SimpleMDE one so will probably be a good PR on it's own. The doc editor commit logic currently follows that of the Also I can imagine another PR will be for SimpleMDE interface when creating ticket comments. |
@gitblit I'll close this PR for the moment as I've found ProseMirror (https://github.com/prosemirror/prosemirror) which, as I'm looking into it further, seems to be a more appropriate fit for Gitblit and supports a wider range of document formats and use cases. It's from the same author as CodeMirror yet has no dependency on it, so greatly simplifies the client-side build script. With this in mind, having a dedicated Hopefully won't be long for me to rework some of these changes into a new PR to support this. :) |
Ok, sounds good. Sorry, I'm easily distracted by too many other active things and it's difficult sometimes to get back to the review. |
Documents listed on the docs page can now be modified and committed via the browser if the user has write permissions.
@gitblit I've squashed into three commits for the main stages, let me know if there's any other changes to make and if you'd rather me squash to one commit. I would like to get npm downloading automatically with maven/ant but didn't have much luck with that~