[TW5] Minor core change to extend user UI Control (edit fields)

83 views
Skip to first unread message

TonyM

unread,
Apr 18, 2018, 7:56:28 PM4/18/18
to TiddlyWikiDev
Folks,

I still have not being able to invest the time in proposing changes through GIT. Can I propose this here please?

I would like to propose the transclusion of a tiddler, perhaps named 

$:/core/ui/EditTemplate/currentfield

in the tiddler $:/core/ui/EditTemplate/fields

This should occur as follows;

<$action-deletefield $field=<<currentField>>/>
{{$:/core/images/delete-button}}
</$button> {{$:/core/ui/EditTemplate/currentfield}}

This would allow additional code to be placed to the right of the delete button on each field listed in edit mode without having to edit the core tiddler 

$:/core/ui/EditTemplate/fields


I am currently building tools for manipulating fields such as
  • Create/link to a tiddler for field name
  • Provide a tool tip to describe the field
  • Provide a selection filter for field values
  • more
I imagine other could benefit from this "hook" into an important part of the UI, this seems a simple change to extend customisation and to preserve core tiddlers.

Alternately we could have a tag that was used to transclude tiddlers at this point like $:/tags/editfields however it is important that current tiddler and <<currentField>> are set correctly.

Regards
Tony

PMario

unread,
Apr 19, 2018, 3:39:06 AM4/19/18
to TiddlyWikiDev
Hi Tony,

Why do you want to use 1 tiddler for several field names?

<<currentField>> will be different, but you transclusion will be the same?

What, if I want a different function for every field?

-m

TonyM

unread,
Apr 19, 2018, 3:52:58 AM4/19/18
to TiddlyWikiDev
Mario,

Good Question, what if you want something different for each field?, 
however my proposal is to respond the same the "same for each field".

The logic in the $:/core/ui/EditTemplate/currentfield tiddler can interrogate the field name and respond differently if you want

Pseudocode

If <<currentField>> = X

if <currentField>prefix[menu-]

But since what I am doing here is adding to the Edit Fields view I think we should follow its basic structure, one line for each field.

I think a separate edit panel or an addition to the view template would be the best place to respond to different fields independently.

Is that clearer?
Regards
Tony


One could add to $:/core/ui/EditTemplate/currentfield the automatic transclusion of the "on-edit" field from the fieldname as tiddler so that one could create a tiddler for each field name, and in that specify what to include. 

PMario

unread,
Apr 19, 2018, 5:02:48 AM4/19/18
to TiddlyWikiDev
On Thursday, April 19, 2018 at 9:52:58 AM UTC+2, TonyM wrote:
Good Question, what if you want something different for each field?, 
however my proposal is to respond the same the "same for each field".

That's nice but imo very use-case specific. .... So I would respond with: Change the template, to fit your usecase ;)
We need a generic solution.

IMO {{$:/core/ui/EditTemplate/currentfield}} is no option. It's a transclusion, that changes the context.

So {{||$:/core/ui/EditTemplate/fields/more-template}} .. may be an option. It uses the content of the tiddler as a template. We may need a better name. I need to think about it. I think that could work for both of us :)

-m

TonyM

unread,
Apr 19, 2018, 6:38:48 PM4/19/18
to TiddlyWikiDev
Mario,

I suspected there was a better way and I defer to your experience. All I want is the hook so I need not modify a core tiddler.

There are other opportunities around, I am only looking for Generic and global solutions.

Like I would like to add a page location in the sidebar called SidebarTop below the subtitle and above the controls for additions to the side bar that are not tabs.
I currently use this space for a more detailed description, or additional menus and or buttons

SidebarTop can behave just like TopRightBar with a tag $:/tags/TopSideBar

I should post that separately.

Regards
Tony

PMario

unread,
Jul 23, 2018, 5:40:42 AM7/23/18
to TiddlyWikiDev
Reply all
Reply to author
Forward
0 new messages