TiddlyWiki / TiddlyWiki5

A self-contained JavaScript wiki for the browser, Node.js, AWS Lambda etc.
https://tiddlywiki.com/
Other
7.98k stars 1.18k forks source link

Provide a simple Method to Edit the fields of the current tiddler #3350

Closed AnthonyMuscio closed 4 years ago

AnthonyMuscio commented 6 years ago

As many may know and according to the TiddlyWiki.com documentation we are prohibited from editing the fields in the current tiddler (from view mode)

This can be resolved by a little reference, self reference and transclusion, or a templates but it has quite a high "cognitive load" to do so, when this should be a simple extension to current methods.

I am in fact building an edit fields solution to do this, which is working fine, and it tries hide this complexity from the user. But this issue is making my development process unnecessarily complex. And I expect turns of a lot of new users who try to add form like fields in a tiddler.

I propose that by hook or crook we introduce a strait forward method, a macro, a widget with javascript if necessary and hidden temp fields, into the core that allows editing fields in the current tiddler directly. Behind the scenes it can be as complex as need be, but you should not need a doctorate in TiddlyWiki to edit-fields in the current tiddler.

I will comment here If I have any inspiration but I hope someone who is better at transclusion and reference somersaults, can code a solution for us all.

AnthonyMuscio commented 6 years ago

Discussion

diego898 commented 6 years ago

Hey @AnthonyMuscio I made a similar request here:

https://github.com/Jermolene/TiddlyWiki5/issues/3308

What do you think?

pmario commented 6 years ago

My suggestion would be to create a different editTemplate, that uses the existing mechanisms. IMO no new stuff is needed. .. Just some thoughts, to make the existing edit mode more flexible.

danielo515 commented 6 years ago

Agree, the cognitive load is one of the worst aspects of this problem.

gernert commented 6 years ago

A long time ago I added a toggle button to my top toolbar which toggles the possibility of tagging in view mode, see http://tw5custom.tiddlyspot.com/#Add%20tagging%20in%20view%20mode

Today I added a toggle button for adding/editing fields in view mode, see http://tw5custom.tiddlyspot.com/#Add%20field%20handling%20in%20view%20mode

Jermolene commented 6 years ago

I propose that by hook or crook we introduce a strait forward method, a macro, a widget with javascript if necessary and hidden temp fields, into the core that allows editing fields in the current tiddler directly. Behind the scenes it can be as complex as need be, but you should not need a doctorate in TiddlyWiki to edit-fields in the current tiddler.

The problems that occur with editing a tiddler via a edit-text widget stored in the same tiddler is an intrinsic issue with the way that the refresh mechanism works. There already is a workaround: to use templates. I don't hold out much confidence that there is a better, general purpose solution that is readily accessible. (I think redesigning the refresh mechanism is unlikely to backwards compatible, and so is likely to be a TWX thing).

AnthonyMuscio commented 6 years ago

To me as gernert suggested, there is no rocket science here, the problem is crafting a mechanism to simplify it for designers and users. My Own edit-Fields "work in Progress" demonstrates this http://tiddlywiki.psat.com.au/EditFields.html

Jeremy, With respect I think you are a long way inside the code, we simply need a user simplified way of doing exactly what we must do. No Core stuff, just some macros included in the empty.html.

Since my ability to code java script in tiddlywiki is limited, perhaps I can design a solution and share it back. Macros provide the ability to solve this as demonstrated in examples, it just in needs to become a standard and documented in standard tiddlywiki, and removing the current instructions that only confuse.

Regards Tony

AnthonyMuscio commented 6 years ago

I am still working on a solution to simplfy the editing of fields, gernert's "toggle button for adding/editing fields in view mode, see http://tw5custom.tiddlyspot.com/#Add%20field%20handling%20in%20view%20mode

Is a good basic solution, but personally I want to provide a list of fields that a given tiddler will display for edit, and since I am keen on icon and date fields being supported I have moved to a larger solution that allows fields to have an edit definition. such that the fields can have tools to manipulate them by type such as date or image link. It is part of my reoccurring desire to see fields also as a first class citizen. When I finish this I expect to be in a better position to create a simple approach to editing fields of the basic type.

Regards Tony

diego898 commented 6 years ago

I really like the idea of a #3308 (coupled with the solution @Jermolene proposed in https://github.com/Jermolene/TiddlyWiki5/issues/1947#issuecomment-261960097) . @AnthonyMuscio what do you think of this?

AnthonyMuscio commented 6 years ago

diego, In the ideas you mention I see value, but this is not key to me as providing a simple tool to everyday users. I have built a sophisticated solution to edit-fields in view mode including providing a way to define the field type such as text, list, colour, image, yes/no true/false etc...

Even one of the simple macros within it will be usable in wikitext or viewtemplate to present an editable field. However with my edit-fields-list tool it will lookup a definition tiddler and respond with a custom editor, the fields can be ordered to build tiddler based forms.

Interestingly your advanced edit mode is in some ways a more basic edit mode where you are looking at the raw tiddler. I think I could build that already but you are aware you will loose all the lookup and validation features, like when adding a field have you got the same spelling as last time, is the tag already there. Can you give me more of the business case, and how you see it being a benefit, perhaps in the issue Advanced Edit Mode #3308 are you mostly wanting to avoid edit mode?

Watch this space for my tool and a basic field editor.

Regards Tony

AnthonyMuscio commented 4 years ago

here has being a lot of water under the bridge on this for me. I will close this one and Open another more targeted one.