logseq / logseq/db-test

Querying an uploaded asset does not expose the asset itself to the table or gallery views

Open
#1,062 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
28
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Search first
  • I searched and no similar issues were found
What Happened?

Uploaded Image Assets do not work properly with queries due to not exposing an asset or file property to the query. This results in the queried assets having no images rendered in gallery view and no column containing the image in table view

My current hack to workaround this is to create and attach a HackExposeAsset property to the uploaded image.

This HackExposeAsset property is essentially a dummy property which takes an asset type. This allows me to set the HackExposeAsset equal to the asset I just uploaded. This allows me to see the image through the table view in the HackExposeAsset column, or allows me to set my gallery display to display only the HackExposeAsset property

Reproduce the Bug
  1. Upload the image by doing /Upload An Asset
  2. Add a tag or page reference to the asset name to allow for querying
  3. Do a query that uses that tag or page reference to find the image, or just query #Asset. Both in my experience ultimately result in the bug
  4. Select gallery or table view
Expected Behavior

I think that I shouldn't need to create and attach a dummy asset property containing a duplicate of the asset just to see my asset in the table and gallery views.

Instead I think some sort of File or Asset property should be exposed to the query so that I can use the gallery view to view each asset.

Screenshots

No response

Desktop or Mobile Platform Information

App Version: 2.0.1
Git Revision: b09316a
Platform: Mozilla/5.0 (X11 Linux x86_64) AppleWebKit/537.36 (KHTML like Gecko) Logseq/2.0.1 Chrome/148.0.7778.180 Electron/42.3.0 Safari/537.36
Language: en-US
Plugins: logseq-move-block-db (v1.1.0), logseq-reminder-notifications-db (v1.5.0), logseq-tabs (v1.19.4), pretty-logseq (v2.0.3), logseq-gallery (v1.11.1)

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.
  • I'm willing to submit a PR (Thank you!)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with /Upload An Asset, add a tag or page reference, and query #Asset. Compare the gallery and table results, then trace how queried uploaded assets are passed to those views. Done means the asset is visible in both views without creating a duplicate HackExposeAsset property.

Written by the indexing model from the issue text.

Assessment

Domain
database, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.