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

First stab at reverse hierarchical display (bug 106) #128

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mclaborn
Copy link

#106

Here is my first stab at this. Notes:

  1. I tried to use with css for the bold account name, but it acted like it could not find the CSS definition in popus.css. I couldn't figure out how to use Inspector in the debug window to work on this.
  2. I reworked BaseItemList.repopulate() to call a sortItems() method which is overridden in TBFolderList and sorts if the corresponding preference is checked.
  3. I'm sorting the folder names on the display string, case insensitive. It might be better to sort a folder node at a time, probably won't matter in the long run.
  4. DE and FR translations are straight from Google Translate.

Copy link
Owner

@kewisch kewisch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just skimmed the review so far, might have a few more comments with more time, and will provide updated German translations.

On debugging, there is an option to disable popup auto-hide, then you should be able to switch windows in the inspector, then you should be able to get to the contents.

For CSS in the webcomponents you need to adjust the CSS within that .js file, for anything outside of the webcomponent it will be popup.css. This will also help you separate the visual from the data.

node = node.parent;
}

return parts;
}

get fullPathReversed() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should separate the display and data aspects. We can get the reversed parts with getFullNameParts(true).reverse(), then in the folder nodes we can use templating and css to set the styles.

On the gmail and empty components thing, I think we could generally filter out empty components in getFullNameparts, and maybe add an option skipGmail that would then always skip [Gmail] folders.

Comment on lines +147 to 155
while (node) {
let isAcctNode = node instanceof AccountNode;
if (includeAccountNode || !isAcctNode) {
parts.unshift(node.item.name);
}
if (isAcctNode) {
break;
}
node = node.parent;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
while (node) {
let isAcctNode = node instanceof AccountNode;
if (includeAccountNode || !isAcctNode) {
parts.unshift(node.item.name);
}
if (isAcctNode) {
break;
}
node = node.parent;
while (node && (!(node instanceof AccountNode) || includeAccountNode)) {
parts.unshift(node.item.name);
node = node.parent;
}

(untested)

@mclaborn
Copy link
Author

I must be blind because I can't get the Inspector to show the pop up window. The Inspector for the add-on only shows the background page.
When I try to open Developer Tools in the main Thunderbird window it doesn't open.
Any thoughts?

@mclaborn
Copy link
Author

mclaborn commented Nov 9, 2023

Any ideas on this?

@kewisch
Copy link
Owner

kewisch commented Jan 20, 2024

Hey, sorry for the radio silence. Around that time I was prepping for a large event at work and then I missed picking this up again after. If you try the developer tools in the add-on options, there is an option to disable popup auto-hide. Can you try that one and see if it shows up?

Otherwise, the main inspector in the toolbar, I'm not sure why it wouldn't show up. What it does is open another instance of Thunderbird and then connects the debugger. Can you try closing all other instances of Thunderbird maybe? Otherwise the folks in #maildev:mozilla.org on Matrix might be able to help you.

@mclaborn
Copy link
Author

I'm feeling stupid - can't get the inspector to show. Can you take a look and tell me what I'm doing wrong? https://www.loom.com/share/2a02d83666834a828f1acc1be8bcad92?sid=091156fa-1d5f-428f-b35b-08eeae660c05

@kewisch
Copy link
Owner

kewisch commented Jul 15, 2024

You could try the full debugger that you can find in Tools > Developer Tools > Developer Toolbox. It will debug a lot more than the extension itself, but it is also more powerful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants