Skip to content

Adds multi-select support#1360

Open
jtreminio wants to merge 10 commits intomcmonkeyprojects:masterfrom
jtreminio:multi-select
Open

Adds multi-select support#1360
jtreminio wants to merge 10 commits intomcmonkeyprojects:masterfrom
jtreminio:multi-select

Conversation

@jtreminio
Copy link
Copy Markdown
Contributor

@jtreminio jtreminio commented Apr 30, 2026

  • works across batch and history containers, synced to each other.
  • can be easily hooked into (see Adding Image Comparison #1345)
  • when enabled, clicking a card description selects the card
CleanShot.2026-04-29.at.23.31.21.mp4

@jtreminio jtreminio marked this pull request as ready for review April 30, 2026 04:51
@jtreminio jtreminio marked this pull request as draft April 30, 2026 22:21
@jtreminio jtreminio marked this pull request as ready for review April 30, 2026 23:45
Comment thread src/wwwroot/js/genpage/gentab/outputhistory.js Outdated
Comment thread src/wwwroot/js/genpage/gentab/currentimagehandler.js Outdated
Comment thread src/wwwroot/js/genpage/gentab/models.js Outdated
Comment thread src/wwwroot/js/genpage/gentab/outputhistory.js Outdated
Comment thread src/wwwroot/js/genpage/gentab/outputhistory.js Outdated
Comment thread src/wwwroot/js/genpage/gentab/outputhistory.js Outdated
Comment thread src/wwwroot/js/genpage/gentab/presets.js Outdated
Comment thread src/wwwroot/js/genpage/gentab/presets.js Outdated
Comment thread src/wwwroot/js/genpage/helpers/browsers.js Outdated
Comment thread src/wwwroot/js/genpage/helpers/browsers.js Outdated
Comment thread src/wwwroot/js/genpage/helpers/browsers.js Outdated
Comment on lines +68 to +76
let getMeta = (metadata) => metadata ? (JSON.parse(metadata) || {}) : {};
let metaParsed = getMeta(metadata);
let isStarred = (e) => {
let currentMeta = e && e.dataset ? getMeta(e.dataset.metadata) : {};
if (Object.keys(currentMeta).length == 0) {
currentMeta = metaParsed;
}
return currentMeta.is_starred;
};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There was a bug in your original implementation:

  1. metadata would initially not exist on an item, causing exception on let metaParsed = JSON.parse(metadata);
  2. metadata would be stale on reads below. Clicking "Enable Starred" would add the needed metadata and also star the items, but then clicking "Disable(d) Starred" would still see stale metadata and not unstar items
  3. Fixed speling

@jtreminio jtreminio requested a review from mcmonkey4eva May 2, 2026 16:06
let textBlock = createDiv(null, 'model-descblock');
textBlock.tabIndex = 0;
textBlock.innerHTML = desc.description;
textBlock.addEventListener('click', (e) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's with all these new click listeners?

Copy link
Copy Markdown
Contributor Author

@jtreminio jtreminio May 3, 2026

Choose a reason for hiding this comment

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

This one is necessary. I couldn't need get multi-select click to select a card if I clicked the description otherwise.

Comment thread src/wwwroot/js/genpage/helpers/browsers.js Outdated
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