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

My Snippets has some bugs #1333

Closed
liuyuqiangchn opened this issue Mar 29, 2024 · 7 comments · Fixed by #1340
Closed

My Snippets has some bugs #1333

liuyuqiangchn opened this issue Mar 29, 2024 · 7 comments · Fixed by #1340
Assignees
Labels
bug Something isn't working feature-request New feature or request released Available in a released installer
Milestone

Comments

@liuyuqiangchn
Copy link

My Snippets is a very useful tool. During my use, I found several bugs.

1:Style problem, the style will not be completely copied

For example, in the picture below, img1 is the original style, img2 is Save New Snippet, bug1 is that the table border is displayed, and bug2 is that the table length has changed.

image

2:Heading problem, Heading1 is missing

For example, in the picture below, img1 is the original style, img2 is Save New Snippet,The title in img2 has lost the Heading1 style and cannot be displayed in the Navigator window.

image

3:This is not a bug, but a feature request. Every time you save a New Snippet or delete a Snippet, you need to close OneNote again before the New Snippet can be displayed. Can this be optimized?

Thank you again for creating such a great plugin!

@liuyuqiangchn liuyuqiangchn added bug Something isn't working unread I have seen it or had time to refine it yet labels Mar 29, 2024
@stevencohn stevencohn added feature-request New feature or request and removed unread I have seen it or had time to refine it yet labels Mar 29, 2024
@stevencohn
Copy link
Owner

Note to self: This line is wrong

stevencohn added a commit that referenced this issue Apr 5, 2024
stevencohn added a commit that referenced this issue Apr 5, 2024
@stevencohn stevencohn linked a pull request Apr 5, 2024 that will close this issue
@stevencohn stevencohn self-assigned this Apr 5, 2024
@stevencohn stevencohn added the next-release Addressed but not yet released label Apr 5, 2024
weissm pushed a commit to weissm/OneMore that referenced this issue Apr 15, 2024
@stevencohn stevencohn added released Available in a released installer and removed next-release Addressed but not yet released labels Apr 25, 2024
@stevencohn stevencohn added this to the 6.2.1 milestone Apr 29, 2024
@A-Nicoladie
Copy link

Hi !
I am currently encountering the same problem (table border displayed and length changed)

image

On top the original model and at the bottom the result of the snippet.

Thanks for all !


Config

  • Windows 11 (23H2)
  • One More (Version 6.6.1 with OneNote 16.0.18025.20214)

@stevencohn
Copy link
Owner

stevencohn commented Nov 14, 2024

OneMore "boxes" are just OneNote tables. No magic here. OneNote tables have some limitations and will grow/shrink per their own rules unless yo manually set their widths.

@A-Nicoladie
Copy link

Well... OK. But how do you recreate a "whatever" box, similar to the info box, via a snippet?

The info, notes and warning boxes are always the same lenght and don't display the border of their tables.

image

@stevencohn
Copy link
Owner

stevencohn commented Nov 14, 2024

They're nested tables. If you place your text cursor inside the snippet, you'll see the Table tab in the ribbon and can turn on the hidden borders for the inner table. The snippet just replicates what you can do manually.

Most of OneMore is just a convenient way of what you can already do in OneNote. Nothing more.

@A-Nicoladie
Copy link

Yes, I completely agree, and that's precisely my problem → the snippet doesn't exactly reproduce what I did manually.
As you can see in my first example, the table border is displayed and the length has changed compared to the model used to create this snippet.

(Sorry if I'm not clear in my explanations 😅)

@stevencohn
Copy link
Owner

Internally, a table has a structure similar to the following, partial XML:

        <one:Table bordersVisible="true" hasHeaderRow="false" selected="partial">
          <one:Columns>
            <one:Column index="0" width="600.0" isLocked="true" />
          </one:Columns>

Columns have a width property but may also have an isLocked property. By default, a OneNote table does not have locked columns. Once you manually set the col width, that creates and set the isLocked attribute to true. Once you set it, you cannot unset it.

When it's set, it will not grow unless you paste a large object that cannot be wrapped, such as an image.
When it's not set, it will grow and shrink based on its contents, unless it's also in a parent table.

The Snippets set the isLocked attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 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.

3 participants