Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(550)

Issue 6447057: Rebased metadata editor (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by spy
Modified:
12 years, 3 months ago
Reviewers:
xiaq, thomas.j.waldmann, Reimar Bauer
Visibility:
Public.

Description

Rebased metadata editor

Patch Set 1 #

Total comments: 7

Patch Set 2 : Add missed modify_meta.html #

Patch Set 3 : Fix js item transclusion #

Total comments: 1

Patch Set 4 : Add a comment to the JSON validator #

Total comments: 7

Patch Set 5 : Delete 'extra_meta_text' key from meta #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -40 lines) Patch
M MoinMoin/forms.py View 1 2 3 2 chunks +15 lines, -1 line 0 comments Download
M MoinMoin/items/__init__.py View 1 2 3 4 6 chunks +44 lines, -23 lines 0 comments Download
M MoinMoin/items/_tests/test_Item.py View 1 chunk +2 lines, -2 lines 0 comments Download
M MoinMoin/templates/common.js View 1 2 3 chunks +6 lines, -6 lines 0 comments Download
M MoinMoin/templates/modify.html View 1 2 2 chunks +7 lines, -8 lines 0 comments Download
A MoinMoin/templates/modify_meta.html View 1 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 9
Reimar Bauer
some comments and questions http://codereview.appspot.com/6447057/diff/1/MoinMoin/forms.py File MoinMoin/forms.py (right): http://codereview.appspot.com/6447057/diff/1/MoinMoin/forms.py#newcode13 MoinMoin/forms.py:13: import json try: import json ...
12 years, 4 months ago (2012-07-30 11:24:26 UTC) #1
Reimar Bauer
redone, please look at the comments of the other version http://codereview.appspot.com/6447057/diff/3002/MoinMoin/forms.py File MoinMoin/forms.py (right): http://codereview.appspot.com/6447057/diff/3002/MoinMoin/forms.py#newcode13 ...
12 years, 4 months ago (2012-07-30 12:03:52 UTC) #2
spy
some answers http://codereview.appspot.com/6447057/diff/1/MoinMoin/forms.py File MoinMoin/forms.py (right): http://codereview.appspot.com/6447057/diff/1/MoinMoin/forms.py#newcode13 MoinMoin/forms.py:13: import json On 2012/07/30 11:24:27, Reimar Bauer ...
12 years, 4 months ago (2012-07-30 12:09:45 UTC) #3
xiaq
http://codereview.appspot.com/6447057/diff/1/MoinMoin/forms.py File MoinMoin/forms.py (right): http://codereview.appspot.com/6447057/diff/1/MoinMoin/forms.py#newcode47 MoinMoin/forms.py:47: JSON = OptionalMultilineText.with_properties(lang='en', dir='ltr').validated_by(ValidJSON()) On 2012/07/30 11:24:27, Reimar Bauer ...
12 years, 4 months ago (2012-07-31 03:04:08 UTC) #4
spy
http://codereview.appspot.com/6447057/diff/10001/MoinMoin/items/__init__.py File MoinMoin/items/__init__.py (right): http://codereview.appspot.com/6447057/diff/10001/MoinMoin/items/__init__.py#newcode153 MoinMoin/items/__init__.py:153: extra_meta_text = (JSON.using(label=L_("Extra MetaData (JSON)")) On 2012/07/31 03:04:08, xiaq ...
12 years, 3 months ago (2012-07-31 09:06:37 UTC) #5
xiaq
http://codereview.appspot.com/6447057/diff/10001/MoinMoin/items/__init__.py File MoinMoin/items/__init__.py (right): http://codereview.appspot.com/6447057/diff/10001/MoinMoin/items/__init__.py#newcode153 MoinMoin/items/__init__.py:153: extra_meta_text = (JSON.using(label=L_("Extra MetaData (JSON)")) On 2012/07/31 09:06:37, spy ...
12 years, 3 months ago (2012-07-31 12:26:48 UTC) #6
spy
http://codereview.appspot.com/6447057/diff/10001/MoinMoin/items/__init__.py File MoinMoin/items/__init__.py (right): http://codereview.appspot.com/6447057/diff/10001/MoinMoin/items/__init__.py#newcode153 MoinMoin/items/__init__.py:153: extra_meta_text = (JSON.using(label=L_("Extra MetaData (JSON)")) > a more practical ...
12 years, 3 months ago (2012-07-31 17:33:06 UTC) #7
ThomasJWaldmann
http://codereview.appspot.com/6447057/diff/10001/MoinMoin/items/__init__.py File MoinMoin/items/__init__.py (right): http://codereview.appspot.com/6447057/diff/10001/MoinMoin/items/__init__.py#newcode153 MoinMoin/items/__init__.py:153: extra_meta_text = (JSON.using(label=L_("Extra MetaData (JSON)")) better don't assume what ...
12 years, 3 months ago (2012-07-31 19:43:01 UTC) #8
xiaq
12 years, 3 months ago (2012-08-01 01:38:54 UTC) #9
http://codereview.appspot.com/6447057/diff/10001/MoinMoin/items/__init__.py
File MoinMoin/items/__init__.py (right):

http://codereview.appspot.com/6447057/diff/10001/MoinMoin/items/__init__.py#n...
MoinMoin/items/__init__.py:153: extra_meta_text = (JSON.using(label=L_("Extra
MetaData (JSON)"))
On 2012/07/31 17:33:06, spy wrote:
> > a more practical example is that you might want need metadata property keyed
> > "template" one day. just a suggestion.
> 
> Agree with that. After all the extra_meta_text is a temporary field. It won't
be
> in the final release of moin2. So, why is it so much attention and debate
about
> it?
> 
> Another thing is the "template" constant. Since we have splitted the
ModifyForm
> in two separate Meta and Data forms, and introduced the macros-based data
> editor, there should be the way to define the template for a particular meta
> form where could be defined the macros-based meta editor.
> Maybe use uppercase for that?
> 

my idea is that the Content's Form is somehow isolated from the Item's, but the
metadata's isn't. (That is, if you need to change the metadata editor, you
probably want to change the overall modify view as well.) The BaseMetaForm is
there to create a namespace so that metadata keys don't get mixed with other
Form elements. Seems better named BaseMetaSchema to avoid confusion.

So I'd keep the extra_meta_text widget in ModifyForm and add a meta_template
class property to it.

> Later I want to define BlogMetaForm and BlogEntryMetaForm in high-level
> Blog(Contentful) and BlogEntry(Contentful) classes (these classes use
itemtype).
> Also I can overwrite the Contentful's ModifyForm property. I am able to assign
> meta_form=BlogMetaForm/BlogEntryMetaForm there. Am I right understand your
> itemtype abstraction idea?

Consider overriding do_modify as well. (Replace the "ok" button with "save
draft" and "publish", for instance.)

Still, the itemtype idea is pretty simple and current implementation is a bit
rough, so some details can still be polished.

http://codereview.appspot.com/6447057/diff/10001/MoinMoin/items/__init__.py#n...
MoinMoin/items/__init__.py:153: extra_meta_text = (JSON.using(label=L_("Extra
MetaData (JSON)"))
On 2012/07/31 19:43:01, ThomasJWaldmann wrote:
> better don't assume what will be in a final release.
> we are not that far yet and currently we will always keep the json. for user
> defined keys, for keys we do not support yet.

yes, i would prefer to keep extra_meta_text at least before the plain json
editor is reintroduced and there is a way to switch between that and the
widget-based metadata editor we're currently implementing. otherwise it results
in lost functionality (which might not matter for users, but does for
developers).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b