Suggested by Nate (quicksketch) - see his attached screenshot for immediate 'oooh'.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Hopping in to help/watch :)

lefnire’s picture

hear hear!

yched’s picture

Status: Active » Needs work
FileSize
7.77 KB
6.96 KB
35.28 KB

I finally gave this a shot, and I must say I'm pretty happy with the results.
Attached patch still needs minimal polishing (thus still CNW), but works pretty well.

This lets admins :
- add a new field
- add (share) an existing field
- add a new group
- directly drag-n-drop them to the right place
straight from the 'Manage fields' screen.
List of widgets is JS-updated when selecting a field type for 'add new field'.
Label and list of widgets are JS-updated when selecting a field for 'add existing field'
(simple update, no AHAH - probably not needed).

See attached screenshots if you want to see what it looks like without applying the patch.

yched’s picture

PS : obvious downside of this new approach wrt the existing 'add field' form is that we don't have much room to put help text ('#description'). This could probably be made better.
Obvious upside is that no-one should have to witness a new user desperately searching the UI for a way to add a new field ever again ;-)

KarenS’s picture

Nice start! I haven't had time to try this out yet, though. I'll try to test it in the next couple days.

moshe weitzman’s picture

My gosh, thats nice. Thanks so much for dedicating time to this.

That screenshot is also my first look at a locked field. Also nifty.

moshe weitzman’s picture

Please, please, lets get this in before release

yched’s picture

I've polished this a little more and will post a new patch very soon. Glad to see there's interest :-)

Karen and I were rather thinking we released ASAP (it can be a matter of days now) and kept this and the 'combo field' work for 2.1.
This patch involves some string changes (not *that* much), and in #278827: String freeze / translation updates before final release we committed to not release less than 2 weeks after the last string change, so committing this means pushing the release by at least another 2 weeks.

OTOH, I was willing to try and release during Szeged :-), but we found out we had to roll a new D5 release first and this got delayed.
So now that Szeged is over, maybe another 2 or 3 week delay is not that dramatic after all...

I'll detail the TODOs on this patch when I update it, we can discuss then...

KarenS’s picture

If it's going to be a couple weeks before we issue an official release, we should issue another rc ASAP. The content copy bug has the potential to break field settings so I'd like to get people using a version without that bug. The fix to keep from deleting data from disabled content types also needs to get into a release, it's now only in -dev.

yched’s picture

Status: Needs work » Needs review
FileSize
40.37 KB

Updated patch. Everything works OK AFAICT, but testers are welcome to push it to its limits.
Comments in a followup post.

yched’s picture

FileSize
20.07 KB

So, there are some points open for discussion :

- Do we want this to deprecate the old 'Add field' / 'Add group' primary tabs ?
I'd say yes ultimately, but probably depends on the points below...

- Help text :
This new way to add fields and groups is much faster when you know what you're doing, but leaves little space for the help text we had in the previous 'Add Field' multistep forms (See screenshot for a comparison).
Current patch puts minimal help text, putting more quickly clutters the UI IMO.
Best thing IMO would be to remove '#description' texts completely, and start integrating with advanced_help.module.to defer beginner's help to a separate popup, ideally with screenshots and all. This help page is still to be written, though; takers welcome :-)

- Field creation workflow :
The main difference with this new approach is that you create your fields and groups without ever seeing the 'configure' form and all the options for the fields.
Once the field is created, it's up to you to find it's 'configure' link in the updated list of fields and click it.
Redirecting to the configure page after form submission is tricky because with this patch you can add two fields (one new, one existing) and one group in one single form submission...

My suggestions, from easiest to most complex :
1) display the link to the settings page in the creation status message : 'Field foo was created. You can now [configure it]'.
2) redirect to settings page if only one item was created (most common case)
3) find a way to cycle through all settings pages for the newly created items, sort of like Views2 does when adding several filters in one go.

[edit : forgot the screenshot]

yched’s picture

And :

- given the points above, do we want this in 6.x-2.0 release, or do we wait until 2.1 ?

KarenS’s picture

Re #11, I think we have to do #3, even though it's more complicated.

The current flow forces people to the settings page where something -- default values at least -- gets saved. I think we always have to assume if there's a way people can break things they will get broken, so if we just say 'you can configure it', I'd bet almost any amount of money that many of them will either not notice the message or will not do it, and our issue queues will fill up with the problems that causes.

We don't currently have any real system for retrieving default values for field and widget settings without going through the UI to set #default_value, so we could end up with a real mess with important field settings values totally empty if that step gets skipped.

It occurred to me earlier that it would be nice to have some sort of hook for each field and widget that you could call to get the correct default values for all its settings, but that would be a major refactoring (and an API change) so it's too late for that. It's also too late to tell field modules that their processing must allow for the possibility that the field settings page never got submitted.

We could use drupal_execute() to trigger the setting of default values, but that has a whole list of problems of its own, so I don't like that idea much either.

Based on that, I'm leaning toward going back to making this a 2.1 feature. There are people waiting for an official release of CCK and I don't want to push that off only because we don't have this feature in it.

hass’s picture

From translators side I have no problem to get a patch with string changes in and to update the translations again, but give translators some time before a "real final" if they like to translate. Telling translators we are in string freeze and then it is not freezed is a problem as this is some work to do again and again :-(

yched’s picture

Karen :
Actually not going through the settings form is only problematic for new fields :
A new group works out of the box using default styling (which is just what 98% people want) even if you don't go through its settings form (I just fixed something in current CCK D6 about that, minor fix to be reported in this patch as well).
A new shared field instance is created by duplicating a previous instance, so its settings are valid straight ahead.

So maybe an easy solution simply is :
4) only redirect to the field settings page if a new field has been created

moshe weitzman’s picture

Yes, advanced_help module is great for these situations. I'd love to use it here, just like Views (optional dependancy).

I don't think it will be too bad to redirect to multiple settings forms. When the overvioew form gets submitted, it redirects to 'a' with querystring of destination=b&destinations[]=c, destinations[]=d. after submitting that first settings form, user redirects automatically to b and has a querystring of destination=c&destinations[] =d.

this will require some custom code but not too bad i hope.

KarenS’s picture

@moshe, I had no idea you could send a series of destinations like that, cool! So where and how exactly do you set those destinations?

@yched, I suspect that most people are creating new fields most of the time, rather than sharing them, but yes, if it's a shared field no setup is needed. No setup is needed on current fieldgroups, but the new combo fieldgroups would need some setup, but that's probably OK since it's a special case and the default settings will not be broken.

So, yes, we just need to handle settings for new fields.

ff1’s picture

This change looks great! Thanks all :)

It would be ideal if the settings form could be displayed below the field list, using JS to display and update in a similar way to views. It would prevent a user from feeling like they may have 'lost' changes during redirection.

yched’s picture

@ff1 : A Views2-like UI would sure be beneficial for many parts in CCK. This might not happen before a while, though, and definitely not before the first D6 release.

@Moshe & Karen :
I'd say polishing this (redirects, removing the deprecated 'add new' form, testing testing testing, writing advanced_help page(s ?), including some time for translators) will push the release for something like another 3-4 weeks. Shipping with this would definitely make the d.o announcement sexier, but right now I'd tend to think releasing sooner is what the community expects...

KarenS’s picture

I know there are lots of people waiting for an official release so they can get sites launched and release dependent modules, so I think we should get our release out and add this feature in right after that.

We can still do a sexy announcement then. Maybe we can get a couple other cool new features in to 2.1, too, like combo fields, for another splash.

hass’s picture

An official final version would be much more sexier then waiting another 4 weeks :-((( for a UI change that could happen later and doesn't change functionality.

yched’s picture

FileSize
98.83 KB

I gave this a push. Here's an updated patch :
- handles redirection to field settings form :
When inside a 'create new' sequence, the 'change basic settings' fieldset and menu elements like primary and secondary tabs are removed, to limit the temptations for the user to break away.
When a new group is created, I chose not to redirect to its settings form. Can be changed if we want, but for 95% use cases people leave the default settings so I think this is a win.
- removes the previous 'Add [field|group]' primary tabs
- themes the 'Manage field' and 'Display field' tabs using templates (theme function was beginning to get unreadable)
- includes fairly extensive simpletests for the new UI
- includes a 1st batch of 'advanced help' pages

The advanced help pages could use a proof-read to fix possible typos.

Now, about when to commit this / when to release :
Because of the recent API changes in Views, we can't make our final release before Views-rc2 ships.
That should happen soon, but it's not there for now.

I gave this new UI quite extensive testing, and IMO this is ready. Committing this now would require a 10 days padding time to fine-tune / debug.
IMO this is worthwhile for such a UI win.

The amount of string changes in this patch is actually fairly minimal - aside of course the new 'advanced help' pages.
But releasing with untranslated 'advanced help' is not that bad IMO.
AFAICT, hass is the only translator that's still in the game, so we probably shouldn't bother about other languages too much.

So my proposal, if Karen is OK, would be to roll an RC7 asap, commit this patch, and roll a final release in 10 days if Views RC2 is ready by then.

yched’s picture

FileSize
18.83 KB

CVS doesn't handle binary files in patches, so here's a zip of the images in cck/help/

yched’s picture

FileSize
295.49 KB

And here's a drop-in replacement, fully patched cck folder for easier testing.

KarenS’s picture

I suspect there will be a delay now before Views will issue a release with the API change to give developers a chance to catch up with it, so I think you're right that we will have a period of time before we can release CCK. So, why not get this in, sure :)

I'm finally getting back into D6 so now I can take a look at this and see if I have anything to add. Unlikely, it looks pretty good, but I'll take a look.

KarenS’s picture

Status: Needs review » Reviewed & tested by the community

I have not thoroughly tested this, but I'm far enough to say Wow!!! This is great!

I don't see any obvious bugs or problems, I'd say go ahead and do a new rc before adding this in and then commit it, as you suggested above. That will get more eyes on it.

yched’s picture

Yay then. RC7 rolled - I'll let a few hours go by before committing this to -dev, just in case the RC7 has blatant failures (I've been caught screwing releases recently...)

Short update : I just added another thing in my (uncommitted) code : do not automatically generate names for fieldgroups. We had a TODO in the code about that, and now seems a good opportunity. Simply adds a new 'group name' form input on the 'add new group' row of the 'Manage fields' tab.

yched’s picture

Status: Reviewed & tested by the community » Fixed

Now that we are more confident about the stability of RC7 and Views compatibility issues have eased a little, I committed this.

The help files could still use a quick reread to fix typos and such - any taker ?

hass’s picture

I don't like this advanced help module... it's help texts are not translatable via pot. And I'm not able to commit this HTML files to modules :-(

yched’s picture

Advanced help files are translatable. Translations are searched in /translations/help, so people can commit them freely just like .po files.

Only downside is that, yes, it's out of .pot, so keeping track of changes in the original help files is more complicated - it requires a file diff of the current state of help files against the state that was last translated. I think a 'translation workflow' discussion in advanced_help issue queue might be a good idea.

This doesn't make the advanced_help feature less precious IMO, and as I said, if the help pages are not translated when we ship, it's still better than no help pages at all.

hass’s picture

I will take a look and try it out... thx

hass’s picture

From usability and eye side I would place the help link question mark icon behind the string - not before. This looks better for the text flow...

for e.g.: on "admin/content/node-type/mytestcck/fields" and add a padding to CSS! Otherwise the small image glues on the text.

New field (?)
New group (?)
Add fields and groups to the content type, and arrange them on content display and input forms. (?)

Additional in "admin/content/node-type/cck-test1/display" if you don't have any fields yet this looks really bad. Table have no row and the link to "new field" is not working. Aside it is yellow notice... it is common that we write such information as plain text into the table first row - until we have table rows...

And I would also add some space between "add" and the above field list table or move it over in a new table below the above table on "admin/content/node-type/cck-test1/fields" + make the "add" bold like above titles to separate.

BUG: "New foo" fields shouldn't be draggable... or you will have other bugs... do it.. move "create fields" to the right, below the "new group" and press "save". You get the errors:

* Add new group: you need to provide a label.
* Add new group: you need to provide a group name.

merlinofchaos’s picture

The help links are hard to position due to the fact that they are CSS sprites and CSS sprites have to be block elements, which means they have to be floated. You can't just place them arbitrarily.

yched’s picture

Due to what merlinofchaos explains, Views currently does "(?) Label", so we'll stay consistent with that.

hass’s picture

FileSize
22.57 KB

But the question mark should come after the text as this is "more" detailed explanation... see the attached screenshot. It also shows the error and the big red line shows what I mean with text flow.

merlinofchaos’s picture

hass: Come back when you've fixed CSS so that can work.

webchick’s picture

It's a far bigger usability issue for CCK and Views (the two core modules that don't come with core) to be inconsistent in the way they present more help, than it is for the ? to come before the text.

I'm also not real excited about spending a whole lot of energy on CSS tweaking at this stage. Let's get 2.0 out! :)

yched’s picture

And I would also add some space between "add" and the above field list table or move it over in a new table below the above table on "admin/content/node-type/cck-test1/fields" + make the "add" bold like above titles to separate.
The styling is there. You should clear your browsers cache.

BUG: "New foo" fields shouldn't be draggable... or you will have other bugs... do it.. move "create fields" to the right, below the "new group" and press "save". You get the errors:
Not a bug : if you try to nest fields below the 'new group' but don't provide the info to actually create the group, it's a mistake.

hass’s picture

Views should also move the question mark behind the text :-)

yched’s picture

OK for the 'display fields' tab bug when there's no field - I thought I checked that, but this needs fixing.
Since this has been committed, subsequent bugs if any should get their own threads.

hass’s picture

Patches attached for advanced_help and cck module + Screenshot from the look and feel with the patch. The icon positioning has been tested with IE6 and FF3.

merlinofchaos’s picture

inline-block doesn't work at all under FF2 and as far as I understand, doesn't work on IE6 either. Certainly not on a div.

yched’s picture

Fixed the issue about 'Display fields' tab when there are no fields.

hass : seeing your screenshots, you *need* to refresh your CSS cache, you do not get the new styles for this page.

yched’s picture

Fixed the issue about 'Display fields' tab when there are no fields.
This involved a string change, BTW.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.