Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page ToC additional option +Top of Page in new container #1712

Closed
jasonjac2 opened this issue Dec 20, 2024 · 4 comments · Fixed by #1724
Closed

Page ToC additional option +Top of Page in new container #1712

jasonjac2 opened this issue Dec 20, 2024 · 4 comments · Fixed by #1724
Assignees
Labels
feature-request New feature or request released Available in a released installer

Comments

@jasonjac2
Copy link

Problem to Solve

Sorry for brevity, doing in a hurry.
I have just reviewed about 20 pages (older ones) and added a ToC.
To avoid breaking the author info on the page, I do the work around of:

  • start a new container (Type a char in space not on any container)
  • Invoice the ToC for the page | Here
  • Right click container "bring to front"
  • make a bit of space in the main container (just press enter between my standard top of page and the first bit of content
    • Top of page (Parent:... Relevant pages: link.......)
    • first bit of content

      Overview

  • Drag the new container into this space

I am having a bit of deja-vu, so if I have raised and this is already a request, let me know and I'll "buy you a coffee" for your wated time :-).

New Feature/Solution

image

add another to the dropdown: New container - At Top of Page -In front
possibly abbreviated to "Top of Page, new container"

It would save a bit of time on the 9000 pages I need to add this to over time.

@stevencohn stevencohn added the feature-request New feature or request label Dec 20, 2024
@stevencohn
Copy link
Owner

stevencohn commented Dec 21, 2024

I think automating this won't work due to this OneNote API bug. Here's why.

Your main objective is to preserve the author information by injecting a new outline at the top of the page.

We can inject a new outline at the top. But that means the existing outline(s) needs to move down by the height of the new ToC outline. Just modifying the location of an outline would overwrite author/lastModifiedTime information on all children within that outline. While you can move outlines manually through the OneNote UI without affecting author info, it doesn't work the same through the Interop API.

  <one:Outline selected="partial">
    <one:Position x="36.0" y="90.0" z="0" />
    <one:Size width="309.1365356445312" height="40.28314971923828" />
    ...
  </one:Outline>

@jasonjac2
Copy link
Author

"But that means the existing outline(s) needs to move down by the height of the new ToC outline."
mmmm why?
image

After command
image

After I've tweaked it manually (which I will have to do when the ToC gets too large)
image

Refresh just refreshes it in place.

@stevencohn
Copy link
Owner

Well, it could just overlap the outline on top of whatever is there, like your second pic, and then let the user deal with it. Maybe another checkbox option? It would have to place it in a consistent location, regardless of where the existing outlines are located.

Is that OK?

@jasonjac2
Copy link
Author

"It would have to place it in a consistent location,"
"Is that OK?"
Yes definitely , but I would do something a bit like a post-it on a page, i.e. right justified on the right margin + a bit with a bit of text: "Make a space on the page and move this to where you want it". So you don't get loads of support questions about why they can't click on it. I finally put it indented a little so you can always click on the main page and / or the ToC.

stevencohn added a commit that referenced this issue Dec 24, 2024
@stevencohn stevencohn self-assigned this Dec 24, 2024
@stevencohn stevencohn added the next-release Addressed but not yet released label Dec 24, 2024
@stevencohn stevencohn linked a pull request Dec 24, 2024 that will close this issue
@stevencohn stevencohn added released Available in a released installer and removed next-release Addressed but not yet released labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request released Available in a released installer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants