Git Product home page Git Product logo

django-scribbler's People

Contributors

benred42 avatar calebsmith avatar daaray avatar dchukhin avatar dependabot[bot] avatar dpoirier avatar imposeren avatar ironfroggy avatar jbradberry avatar kmtracey avatar lorienolive avatar mlavin avatar nippo avatar petrdlouhy avatar reduxionist avatar rlconley avatar ronardcaktus avatar tobiasmcnulty avatar vkurup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-scribbler's Issues

Cannot edit blank scribbles

(This may be fixed by #26, but I don't want it to be forgotten so logging it on its own also.)

If a scribble is blank (scribble model or model field), then it can't be edited any more. Hovering over it does not highlight it if it is empty...

Translation

Allow the client's text to be translated and displayed to the end user in their preferred language.

The details of how that would work can be fleshed out. We'd need to store each scribble in multiple languages, and provide a way for translators to conveniently go through scribbles that have been added or edited and create or edit the translations.

Saving Drafts

Some content might take a while to change and it would be nice to have a way to save a draft possibly with HTML5 local storage.

Break Up Editor and Menu Code

Currently the editor customization and top menu code live in scribbler.js along with their initialization. This means that you can't have any JS run prior to initializing these elements. It would be easier to customize these as their own plugins (such as a new menu item or editor button) if they were written separately, loaded, then initialized.

Permission Checks

Ensure proper permission checks are in place and respected for displaying the form and on receiving the edits.

Managing JS Dependancies

I'm considering changing how CodeMirror, RequireJS and jQuery are bundled to use Bower. This would replace the libs directory with a components directory. For the end user this would not have much of an impact but it would make it easier for us to upgrade these dependencies as new versions are published.

Use r.js Optimizer

The current documentation asks users to use RequireJS to lazily load all of the necessary JS requirements. It might be easier/more familiar for users to include a single optimized JS file built with r.js.

Shared Scribbles

Currently scribblers are unique by url and slug and there is no way to use the same scribble on multiple pages.

JS Tests

We should add some tests for the Javascript.

Full Screen/New Window Editing

For large blocks of content it might be helpful to be able to break the editor off into a new window to make it full screen and side-by-side with the content similar to the Chrome developer tools.

Scribble Context

The context of rendering a scribble is limited to what is given by the content processors. Users editing a scribble will likely want to know what variables are available to them.

Change Wrappers From div to span

@kmtracey noted that since the wrappers around the scribbles, form and previews are <div>s that forces them to a block layout. Perhaps these should be changed to <span>s to lessen the chance of impacting the page rendering.

Missing close class style

The code edit close link is not getting floated to the right when integrating scribbler into a new site. The right-float for the example site is coming from close.less in the example project's styles (under example/static/less/bootstrap). For reasons I don't understand I'm also seeing both the X and the "close" text overlaid on each other when the link is not floated right...forcing the float right makes the "close" text go away.

Show list of 3 most recent changes to scribbles on page

Something we have discussed, it creating the ability for users to be able to tell who has made the most recent changes on the page. While we could get quite complicated in implementing this, I'd like it to start out with the following:

  • List of most recent changes
  • Username associated with that change
  • Possibly a timestamp for when the change was made

Both the username and timestamp to live directly next to the change it is associated this.

Also, a good place to put this would be in the newly created pull out menu at the top of the page. Here is an example of how it might read:

Last 3 changes to page:
'header' scribble by juliaelman on 12/31/2012 at 12:31PM
'header' scribble by csmith on 12/05/2012 at 09:02AM
'days_log' scribble by kmtracey on 11/22/2012 at 3:13PM

Cannot preview any scribbles without edit or create scribble permission

If a user does not have permission to edit/add scribbles, but does have permission to edit a field on the page that is in a scribble_field tag, they can bring up the editor for that field, but cannot preview or save any changes.

Preview view is checking specifically for the scribbler.change_scribble and scribbler.add_scribble permissions. If the user does not have one of those, forbidden is returned. If the preview does not succeed, save is not allowed.

Possible ways to fix:

1 - Expand information POSTed to preview to include the actual model being edited, and have preview check for permissions on that model instead of hard-coding the scribbler model.

2 - Remove permission checking from preview. Preview isn't actually making any changes so why does it need to check for the permission to do so? Ultimately the save will fail if the user really does not have permission to save what they are previewing.

3 - Require that the user must have scribble field permissions even when editing non-scribble fields. This would need to be noted in doc and enforced in scribble_field tag and save view.

I'm leaning towards option 2...it's easiest and I don't see why preview needs to be doing permission checking?

Disabled Button State

Save button needs a disabled state for when the current template content is not valid.

Generate Final Translations for v0.4 Release

#63 adds two more stings to be translated and I'm pretty sure we can get them figured out correctly even with out limited knowledge of French. I also found what I believe is a typo in the "Save as Draft" translation which should read "Sauvegarder comme brouillon" rather than "Sauvergarder comme brouillon" (extra r).

Full Page Scribbles

There might be a use-case for full page scribbles as a contrib.flatpages replacement.

Images in Scribble Content

Future task but needs some kind of a solution eventually. Users will want to put images into the scribble content and there needs to be some way to do that. This might be a plug-in which is enabled for scribbler or hooks for an existing Django app.

Save Button

Save button currently doesn't function. Needs to be connected to save/edit view.

Create log out button

We need a log out button for when the user is done editing and wanting to log out. Probably just place it in the bar with the "SAVE", "SAVE AS DRAFT" and close buttons for now.

Caching

Caching needs to be put in place to ensure that using the project won't slam the database.

Feedback on Saved/Unsaved Changes

Users should have some indication that there are unsaved changes so that they don't close the editor thinking they have been saved.

migration 0002 max key length error when using MySQL and UTF-8

If MySQL has a default encoding of UTF8 the unique_together index key is too long for the Scribble model:

class Scribble(models.Model):

   ...

    slug = models.SlugField(max_length=255, blank=True, default="")
    url = models.CharField(max_length=255, blank=True, default="")
    content = models.TextField(blank=True, default="")

   ...

    class Meta(object):
        unique_together = ('slug', 'url')

and migrate results in this error:

django.db.utils.DatabaseError: (1071, 'Specified key was too long; max key length is 1000 bytes')

Neither field is more than 255 characters, but with UTF8 encoding MySQL reserves 3 bytes for each character. And as the unique_together is set for two fields, that's 255 x 2 x 3 = 1530.

Display Template Errors

Currently the preview view returns the template error information but it's not used in any useful way on the client side. This information needs to be displayed to the user so they can fix template problems.

Initial Migrations

South migrations should be created for current models prior to the initial release.

Links in scribbles do not work properly

The below template fragment describes the problem.

...
{% scribble 'test' %}
<a href="/another-page/">Clicking this link will show the scribble editor before navigating to /another-page/</a>

<a href="#other-section">Clicking this link will show the scribble editor, but not navigate within the page</a>
{% endscribble %}
...

Discard Draft

The auto-draft/auto-restore is quite aggressive. There should be a way to discard an unwanted draft so that it is not continually restored.

Z-Index Issue

Similar to the problem in #16 there is a problem with the editor z-index and items can appear in front of the editor content when it scrolls up.

Code Mirror Inclusion

CodeMirror will be included in the distribution but it should be easy to update in the repo and easy to use your own version (most likely a documentation issue).

Links in Editable Content

When a content editor is logged in they can't click on links in the editable content because clicking on the area opens the editor.

Update CodeMirror

CodeMirror v3.0 is out now and has some improvements to the gutter model and inline widgets that could be helpful for us.

Deleting Scribbles

There should be a way to delete a scribble which would restore the default scribble text. Needs to be clear to the user that this is what will happen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.