Skip to content

[Feature]: Add metadataTab ui components - #5

Open
Waqibsk wants to merge 5 commits into
bookbrainz:gsoc-2026from
Waqibsk:metadataTab-ui
Open

[Feature]: Add metadataTab ui components#5
Waqibsk wants to merge 5 commits into
bookbrainz:gsoc-2026from
Waqibsk:metadataTab-ui

Conversation

@Waqibsk

@Waqibsk Waqibsk commented Jun 24, 2026

Copy link
Copy Markdown

Note: please checkout PR-4 first, changes are made on top of that

@Waqibsk
Waqibsk changed the base branch from master to gsoc-2026 June 24, 2026 14:21

@MonkeyDo MonkeyDo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good from here!

A couple of details:

Comment thread __init__.py
__docformat__ = 'restructuredtext en'
class CalibbrePlugin(InterfaceActionBase):
name = "CaliBBre"
description = "A plugin for Integration with bookbrainz"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
description = "A plugin for Integration with bookbrainz"
description = "Integration with the BookBrainz API"

Comment thread workers.py

cover_bytes = None
if isbn:
cover_url = f"https://covers.openlibrary.org/b/isbn/{isbn}-L.jpg"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Considering the image load quite slowly, I wonder if we should be using another size instead for a better user experience:

Suggested change
cover_url = f"https://covers.openlibrary.org/b/isbn/{isbn}-L.jpg"
cover_url = f"https://covers.openlibrary.org/b/isbn/{isbn}-M.jpg"

@Waqibsk Waqibsk Jun 29, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Tested this.
Sharing the comparison.
( Although I did not notice any significant improvement in loading speed )

( Screenshots )

  1. L (66kb)
image image
  1. M (29kb)
image image
  1. S (2kb) ( ofc we will not use this :) )
image image

Comment thread ui/metadata/details_panel.py
@MonkeyDo

Copy link
Copy Markdown

Sorry, some comments should apply to PR #3 instead 🙈

Comment thread plugin.py

@MonkeyDo MonkeyDo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A few small requests, no notes apart from that 👍

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think it would be nice to have an "Open in BookBrainz" button that would open the browser to the expected page


def retranslate_search_panel(self, _translate):

for col, text in enumerate(["Name", "Authors", "Language", "BBID", "SortName"]):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I would expecrt "Sort name" here with the space and second word lowercase


self.label_searchResults_metadataTab.setText(_translate("Dialog", "Search Results"))
self.pushButton_fetch_metadataTab.setText(
_translate("Dialog", "Fetch Book Metadata")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Let's keep the capitalization consistent across the board: "Fetch book metadata"

_translate("Dialog", "No matching books found")
)
self.label_searchingMetadata_metadataTab.setText(
_translate("Dialog", "Searching Metadata...")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Capitalization: "Searching metadata"

item = self.tableWidget_metadataTab.horizontalHeaderItem(col)
item.setText(_translate("Dialog", text))

self.label_searchResults_metadataTab.setText(_translate("Dialog", "Search Results"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Capitalization: "Search results"

Comment on lines +185 to +188
self.label_name_metadataTab.setText(_translate("Dialog", "Name:"))
self.label_data_name_metadataTab.setText(_translate("Dialog", ""))
self.label_sortname_metadataTab.setText(_translate("Dialog", "Sort Name:"))
self.label_data_sortname_metadataTab.setText(_translate("Dialog", ""))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You know, I wodner if the sort name should be displayed so prominently considering the available space.
I would suggest maybe it would be better to have it after the title in parenthesis:
"Name: A Voyage to Arcturus (Voyage to Arcturus, A)"

Any opinions?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yeah it looks great :) .
Also it will be truncated to "..." if it overflows

image

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