Sorry, this was answered before.On Tuesday, April 9, 2024 at 9:44:40 PM UTC+2 Emiliano Heyns wrote:Are IOUtils and PathUtils available in Zotero 6?
> while the section is showing up, the title for it isn't. How do I debug this?The title's ftl:```betterbibtex-item-pane-header =.label = Citation key```The sidenav's ftl:```xxx =.tooltiptext = xxx```
> but it doesn't take the full width available. Is there sample code that adds fields to the section?Maybe related to https://www.zotero.org/support/dev/zotero_7_for_developers#mozilla_platform #Firefox 102 → Firefox 115I see you have explicitly set the width to 80%, so I suppose you have figured it out.
we do include the `setSectionSummary` in the API's hook props:
https://github.com/zotero/make-it-red/pull/9/files#diff-bc732f32d404680c71c797ef9e4f61b14f0adc55edb91835277b13d2afc075a2R63
> but the section header doesn't showYou need to load the `ftl` file into the window using `window.MozXULElement.insertFTLIfNeeded('better-bibtex.ftl')`.
And don't use the same ftl string for both the section's sidenav button and its header. The `label` will appear inside the sidenav button.
> Setting flex="1" doesn't have any effect.In fx115, the `flex=1` works differently compared to earlier versions. So very likely they do not work the way in fx102 or fx60.
The section summary only shows up when the section is collapsed.
> Or is this just part of the main window?Yes. The `onMainWindowLoad` in the bootstrap.js
> UI now uses modern flexbox instead of XUL layout, so Mozilla CSS properties need to be replaced with standard properties (e.g., -moz-box-flex: 1 → flex: 1) and there are various layout differences> so I had assumed to flex="1" would have allowed the text input box to stretch.Here are two things: the attribute `flex="1"` and the CSS property `flex: 1;`. In fx115, the attribute `flex="1"` on XUL elements adds the CSS property `flex: 1;` to the element, which equals to the CSS `flex-grow: 1; flex-shrink: 1; flex-basis: 0%;`
So in your case:1. the input element is not a XUL element so the attribute `flex="1"` won't work;2. the CSS `flex: 1;` won't do anything since its parent element, the `body` element, does not use a flex layout, unless you set CSS `display: flex;` to the `body` element.
> If the data behind the section changes in the background (like the citekey being regenerated in my case), how do I tell Zotero to refresh the custom section (and later the info section)?There is a `refresh` in the `onInit`'s props, see https://github.com/zotero/zotero/blob/adaa61f2cfcaced1ded9c22438e6484ec62bf4dc/chrome/content/zotero/xpcom/itemPaneManager.js#L62-L65Register a notifier callback in `onInit` which calls `refresh` when the item is modified and unregister it in `onDestroy`.
> Any .ftl files you place in the locale subfolders will be automatically registered in Zotero's localization system.That means they can be referenced using the file name, while you still need to insert them into the window.
> How can I know what item is being displayed? Should I remember that in the onRender?The `onRender` and `onAsyncRender` have `item` in the props, as shown in the examples in make-it-red. If you need to access the item outside the render callbacks, e.g. in a notifier callback, you can set the item id as an attribute to an element, e.g. the `body`, in the `onItemChange` callback.
The `onMainWindowLoad` is only called when a main window is loaded after the plugin is initialized, while initializing the plugin may happen after a main window is already loaded. You'll need to manually execute the relevant logic on existing main windows (from Zotero.getMainWindows) in `startup` in `bootstrap.js`. See make-it-red: https://github.com/zotero/make-it-red/blob/5a7ee1be2f147a327220c1e5a4129d6c6169999c/src-2.0/bootstrap.js#L22.
The `props` is of type `SectionHookArgs`, which is https://github.com/zotero/zotero/blob/e7b792e2d5f7dab25136b1e30ff75be388f4ac0d/chrome/content/zotero/xpcom/itemPaneManager.js#L60-L61, where the `SectionUIHookArgs` has `item`: https://github.com/zotero/zotero/blob/e7b792e2d5f7dab25136b1e30ff75be388f4ac0d/chrome/content/zotero/xpcom/itemPaneManager.js#L48-L55
On May 18, 2024, at 3:29 AM, Emiliano Heyns <emilian...@iris-advies.com> wrote:
Is there a way to refresh the middle pane (for Zotero 6 and 7)? I might be displaying the citekey in the table, and it might change without the item changing.
--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/1ed58b8c-cbdf-4ae9-b07d-fe7fe223a21dn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/1749f6ed-9dfa-4eda-baf0-07223a58f7f6n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "zotero-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zotero-dev/wirqnj_EQUQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/6E5F2243-692D-4CA5-9E11-17758EB1B94A%40berkeley.edu.
> Is there also an API that would allow adding the citation key to the main item pane?
The API for the info section of the item pane (which I guess is the `main item pane` you mentioned`) is in progress; Currently, an alternative could be displaying the citation key in a custom section.On Wednesday, April 24, 2024 at 3:21:33 AM UTC+8 Emiliano Heyns wrote:Is there also an API that would allow adding the citation key to the main item pane?On Saturday, March 30, 2024 at 3:18:17 PM UTC+1 Dan Stillman wrote:We've just merged the branch we've been working on that updates Zotero
to be based on Firefox 115 ESR instead of Firefox 102 ESR. This will be
the ESR version of Firefox used for the initial public release of Zotero 7.
This is a work in progress with definite bugs, but we're hoping to push
out a Zotero 7 beta build based on this code on April 8. To give plugin
developers a chance to update their code first, we've pushed builds on
the 'dev' channel:
https://www.zotero.org/support/dev/zotero_7_for_developers#dev_builds
(As before, this channel will only be active until we push out a beta
with these changes.)
We've added a section to the Zotero 7 developer docs that covers the
biggest changes to the Mozilla platform from Firefox 102 to 115:
https://www.zotero.org/support/dev/zotero_7_for_developers#firefox_102_firefox_115
This version also includes the promised API for adding custom sections
to the item pane:
https://www.zotero.org/support/dev/zotero_7_for_developers#custom_item_pane_sections
Some of the Mozilla changes (IOUtils, Services.prompt, flexbox) already
work fine in 102, but for the rest, you can use
Zotero.platformMajorVersion to test whether a Zotero 7 build is based on
Firefox 102 or 115, which will allow you to update your plugin in
advance of the Zotero 7 beta that includes these changes.
Let us know if you have any questions!
--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/b3d1780f-c548-43a1-9a02-4e26c92b3a1bn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/10e82fdd-75ef-4f2d-8553-fe5df0895687n%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "zotero-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zotero-dev/wirqnj_EQUQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotero-dev/40c7e2b8-babf-4176-b75c-6b54563d77cfn%40googlegroups.com.