Case Study: design in map view, then make sense in outline view

At the Zoom Meetup: 2020-08-29 I shared a problem and I got some great advice that I’m going to try to implement.

Context

I’m teaching a new meditation class. I began planning for the class in map view. I created notes on a wide variety of topics which included possible talks, discussion questions, meditations, etc. As I saw the different types of notes emerging I create prototypes which would give the note color and an icon. I then created containers and started arranging the material. All of this helped me to ensure that each class was getting the right mix of everything.

Problem

Although everything looked great in the map view, everything was scrambled in the outline view.

Solutions

You can see the video here at the 25 minute markof us trying to work through the problem.

Use agents

  1. Create a new container
  2. Add agents to find notes for each session
  3. Sort those notes by position in the map

Use the Attribute Browser

  1. Using the attribute browser we were able to see that some of the notes weren’t given a session.
  2. We were able to see notes that had no values
  3. We then added session to the menu bar that made it easier to see the attributes of notes

Next Steps

I know how to implement “use agents” but I’m not sure if I know how to “sort by the position in the original map”. I’ll reply back to this post if I succeed or I’ll ask a follow-up.

If anyone has any questions or suggestions, please let me know!

4 Likes

Bear in mind the attributes for map position ($Xpos and $Ypos) are intrinsic. This means the alias may have the same $Xpos/$Ypos as the originals but it doesn’t share it. Put another way the two can differ. This is needed as in most cases the alias, where on the same map or another, is in a different location so needs it’s own X/Y co-ordinates.

Also, agents sort, and keep sorted their children (the aliases) by default. for you prurposes you don’t want this so having made you agent to collect (aliases of the desired note) you’ll need to disable the default layout. See $CleanupAction.

Now, the agent can be told to use the same X?Y for the alias as in the original map. Set the agent action to:

$Xpos=$Xpos(original);
$Ypos=$Ypos(original);

Late here and I must finish, but that should help with the first steps.

@mwra this is all very helpful! I think I was barking up the wrong tree. I’ve made the agent and now I’m trying to figure out how to sort by the original position in the map, but I’m sure this is going to involve some code.

Edit: I can’t figure it out, but I think I have a strategy on the map view page to add an attribute to the position in the map.

When you say ‘sort’ do you mean in some sort of grid, or that notes have the same position as on the original map?

Don’t forget the {x,y} positioning of map items has no relation to $OutlineOrder. The latter only affects the map Z-axis, i.e. the stacking order when things overlap. Moving things in the X and Y axis has no effect on $OutlineOrder, so likely isn’t what you want in your agent.

If you want the aliases to have the same outline order as their originals, you’ll need to make an attribute to hold $SiblingOrder (i.e. order within a given container), as whilst $SiblingOrder is intrinsic it is also read-only. So let’s make a Number-type user attribute $CustomOrder.

Now use a stamp to set this for the aliases in the agent

$CustomOrder=$SiblingOrder(original);

Now set the agent’s $Sort to use $CustomOrder. TaDa! This should set the outline order in this container—i.e. the aliases—to be the same as in the container holding their originals.

If you need to whole system to update as originals change, make the agent’s action:

$CustomOrder=$SiblingOrder(original);

Now, each agent update cycle the agent will check if the originals and moved, update the alias and the agent’s existing sort will re-sort the aliases if needs be.

If you’re wondering why there is self-assembly here, it is because I don’t every recall anyone asking how to do this before. I’ve just figured this from Tinderbox first principles based upon your question. This is why understanding the toolbox pays off as not everything can sensible be a baked in feature (consider the ROI of the engineering time involved). By comparison it took me about 10 minutes to figure this, build a test rig, make a false start and then get a solution. Useful hint there, I used a doc with one container with 8 notes manually sorted our of $Name) sequence - i.e. easily checked by eye. Plus, one agent. Once the alias order matched the original order: job done! Plus i would then have only copied ‘correct’ code to a real work TBX were I applying the method. Test docs save time, and the angst of messing up a larger work doc.

(Ideas above tested in v8.7.1).

1 Like

Sorry if this is off-base. I do not participate in these phone calls so do not know the context. I suggest trying to simplify problems and solutions as much as possible. And if the problem is one-off (not like to occur frequently) then eliminating automation as solution is often the best road.

That said,

  1. Why bother with an agent when it is the sort order of the mapped container that seems to be the issue
  2. So, if #1 is true (I don’t know; I wasn’t there) then I would add a numeric attribute (or $MyNumber) to the notes in question and manually use that to indicate the proper sequence. Eg, Note-by-note: $MyNumber=1; $MyNumber=2; … and so forth.
  3. Then sort the outline by $MyNumber.

My suggestions are probably totally all wrong and out of context. When I see automation invoked to, basically, fill the glass with water one time, then I wonder if there’s a better way.

1 Like

Thanks @mwra and @PaulWalters!

Yes. Here is the process that I want to take.

  1. Map View: manually arrange the order of items
  2. Outline view: aliases automatically reflect the order in the map view

Yes, this is the issues. I actually like this method of planning so much, I’m going to start using with with more courses so it is helpful for me to think this through.

Here are some things that I tried or thought about:

1st Pass I tried to assign a $sequence based on the row or column of an adornment. Is this possible? I can’t figure it out.

2nd Pass


Note: Moving from ordering the activities to a horizontal plan instead of a vertical one. The session attribute adds the session number. The 1, 2, 3 adornment adds the sequence number.

3rd Pass
I ended up doing part of what Paul suggested and manually adding a number.

What’s Next?

I’m going to try what Mark is suggesting and think about Paul’s less automatic solution.
I’m also going to think about if there are some groupings that can lead to composites. For example, a typical pattern is a) talk b) meditate c) share experiences d) Q & A. This will potentially to a lot less dragging and numbering

I’m grateful for the help. Thanks for letting me work out loud.

@mwra I’m trying to understand your method because it sounds useful. If {x,y} positioning of map items has no relation to $OutlineOrder I’m not sure how this works. Would I need to arrange in outline order in the original container? If so, this doesn’t solve the goal of arranging in map view and have that reflect in an outline view.

Here is a map of me trying to figure it out

test map creates outline order.tbx (110.5 KB)

I do have solutions that work, but I’m trying to understand this method.

Thanks!

How about:

Does that help?

But, do bear in mind that $OutlineOrder, as is being leveraged here has no relation to map position. IOW, what you mentally interpret as order, be it left-to-right, vice versa etc., has absolutely no rration to outline order. Really? Yes, the problem in your test case is the map items ate likely entered in one session and nor rearranged.So…

But, play around with the—presumed—map order and all bets are off. moving an item in the x/y space on the map has no effect on outline order. Ignore your intuition that it should be different. As they say in the mafia movies “it is what it is” (IOW no use trying to argue otherwise).

Thus the solution @PaulWalters has suggested. Capture your presumed map order into a Number type attribute on which the outline may be sorted.

Yes, this all makes sense. Thanks for all of your time and the mafia movie reference!

For now, I’ll use @PaulWalters solution. At some point I might play around with this:

It’s also worth noting that adornments are map-only and separators are outline-only so a separator might be a useful way to simulate an adornment in outline view.

For a a 2- dimensional matrix like above, that can’t work, but you could make each adornment have an OnAdd, e.g. for adornment “Session 01”:

$MyNumberAttr = 1;

or

$MyStringAttr = "01";

The latter is because a String-based attribute will sort lexically, i.e. 1, 10,9 not numerically, i.e. 1,9,10.

Thus, using Number-based attributes, note “Q & A.” could be set, via the adornment OnAdd
to a $MySession value of 2' and a $MyWeekvalue of3`, etc. Of course, attribute names like $MyWeek would likely be replaced by your own better-named version for actual work.

HTH!

1 Like

Hi Steve,

Like Paul I didn’t watch the video so this may be way off base.

What if you sorted by $XPos and then by $YPos? I’m not sure this works with agents and aliases, but it seems to work with the original notes. See my quick experiment with the file you posted.

This works with the original vertical stacks posted in your first image in this thread. Session one notes are all furthest left (thus sorting first) and then top to bottom.

test map creates outline order.tbx (95.0 KB)