Ticket #755 (closed enhancement: fixed)

Opened 5 years ago

Last modified 2 years ago

[TiddlyWeb] establish a system for managing the default server and bag for new tiddlers in a TiddlyWeb produced wiki

Reported by: cdent Owned by: cdent
Priority: major Milestone:
Component: tiddlyweb Version:
Severity: medium Keywords:
Cc:

Description (last modified by FND) (diff)

When running a TiddlyWiki with the TiddlyWebAutoSavePlugin? we need to be able to (optionally) state what the default server and default bag are for newly created Tiddlers which have not inherited such information from another tiddler.

One way to do this is to have a DefaultBag? tiddler somewhere in the Store. In the adaptor or the auto save plugin if required server.fields are not set, look in DefaultBag? for the url of a bag and calculate fields from it. If there is no url in the in the tiddler, look at its fields and use those.

Just a candidate idea. Are there better ones?

Attachments

ticket755.patch Download (0.7 KB) - added by FND 4 years ago.

Change History

Changed 5 years ago by FND

  • priority changed from minor to major
  • description modified (diff)

For the initial release, the choice should be left to the user (e.g. a drop-down menu of currently active bags). More hands-on experience is needed for the final solution.

Changed 5 years ago by FND

  • owner changed from ChrisDent to FND

This could be implemented as a toolbar command (automatically extending ToolbarCommands?).

Changed 5 years ago by FND

  • milestone set to TiddlyWeb 1.0 beta

Changed 5 years ago by FND

Initial efforts with TiddlyWebTiddlerSourcePlugin? (changeset:7732 ff)

Changed 5 years ago by FND

  • type changed from defect to enhancement

Upon further consideration, it appears that the current approach is misguided: Rather than having end-users select the source (host & bag) when creating/editing a tiddler, this decision should be made up-front by the respective document author* - usually by providing different buttons for tiddler creation (e.g. "New Private Note", "New Article" etc.).

To this end, the NewTiddler? macro might be extended to be able to read defaults from a systemServer tiddler. Also, systemServer tiddlers might need to support arbitrary fields.

* which, on initial setup, might be TiddlyWeb itself

Changed 4 years ago by FND

Server-side implementation in changeset:8014.

When creating an instance, TiddlyWeb will now create two bags, system and common, as well as a default recipe (cf.  discussion).

On the client side, a plugin needs to set defaultCustomFields accordingly:

config.defaultCustomFields = {
	"server.type": "tiddlyweb",
	"server.host": "127.0.0.1", // example
	"server.bag": "common"
};

It is currently unclear how the correct host can be determined automatically.

Changed 4 years ago by cdent

One could presumably set server.host by looking at the server.host field on some known tiddler somewhere, perhaps the adaptor plugin? I'm not sure which one would be best, but in case, there will be some tiddlers that server.host set, and digging in there somewhere should get the goods.

Changed 4 years ago by FND

One could presumably set server.host by looking at the server.host field on some known tiddler

While Jeremy would probably favor a solution based on systemServer tiddlers (see above), this sounds like a good first step.

I have just committed a simple  TiddlyWebConfig, which reads the host from its own tiddler.

Changed 4 years ago by FND

  • status changed from new to closed
  • resolution set to fixed

Server-side implementation in changeset:8014.
Client-side implementation in changeset:8020.

Changed 4 years ago by FND

  • status changed from closed to reopened
  • resolution fixed deleted

While the components are ready, instancer still needs to be updated:

Changed 4 years ago by FND

  • owner changed from FND to cdent
  • status changed from reopened to new

Changed 4 years ago by FND

Changed 4 years ago by cdent

  • status changed from new to closed
  • resolution set to fixed

patched, confirmed, released.

Changed 2 years ago by cdent

  • milestone TiddlyWeb 1.0 beta deleted

Milestone TiddlyWeb 1.0 beta deleted

Note: See TracTickets for help on using tickets.