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

[Bug]: Unable to set local image as background #1812

Closed
3 tasks
CaptnLucid opened this issue Jan 23, 2025 · 15 comments
Closed
3 tasks

[Bug]: Unable to set local image as background #1812

CaptnLucid opened this issue Jan 23, 2025 · 15 comments
Labels
bug Something isn't working triage Needs triage

Comments

@CaptnLucid
Copy link

Current Behavior

If I find an image online to set as the background and put it within the url('path/to/image.jpg') center/cover no-repeat it loads just fine. However, if I download said image in JPG and PNG format, it doesn't seem to read it when following the ~/Downloads/background.png example.

Expected Behavior

Image should show in the background but instead shows the default color.

Steps To Reproduce

  1. Download image, place it in any easy to access folder.
  2. Make edit to preset file.
  3. Image background doesn't load

Wave Version

v0.10.4

Platform

Windows

OS Version/Distribution

Windows 11

Architecture

x64

Anything else?

This could very well be a user error but with typing the formatting multiple different ways, even with some causing Wave to yell at me, it doesn't want to work unless it's an actual link.

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later
@CaptnLucid CaptnLucid added bug Something isn't working triage Needs triage labels Jan 23, 2025
@esimkowitz
Copy link
Member

esimkowitz commented Jan 23, 2025

You still need to wrap it with the url(...) for a local file.

@CaptnLucid
Copy link
Author

You still need to wrap it with the url(...) for a local file.

I have wrapped it inside the url(...). Sorry, forgot to clarify that.

@esimkowitz
Copy link
Member

does wsh setbg ~/Downloads/background.png work?

@CaptnLucid
Copy link
Author

does wsh setbg ~/Downloads/background.png work?

It does not, no.

@CaptnLucid
Copy link
Author

After some more initial testing, it seems like looking for local background images are bugged when a backgrounds.json file is nested within a preset folder.

I was attempting to do this: ~/.config/waveterm/presets/: Directory for organizing presets into separate files and it wasn't registering, but once I moved directly over to the main presets.json (which wasn't made prior to testing), it worked. the backgrounds.json still reads url links to images, just not local ones.

@esimkowitz
Copy link
Member

ah the right name for that file in presets is bg.json, not backgrounds

@esimkowitz
Copy link
Member

to confirm, local paths still aren't working after making this switch, right?

@CaptnLucid
Copy link
Author

to confirm, local paths still aren't working after making this switch, right?

In the base presets.json, local paths work properly.
In presets/bg.json the local paths also work. However, it does need to be noted that for some reason, naming it backgrounds.json and using a web link to an image did also work.

Can the documentation on the website get updated to point at making bg.json instead of backgrounds.json?

@esimkowitz
Copy link
Member

Actually nvm, presets/backgrounds.json should work as well...

@esimkowitz
Copy link
Member

esimkowitz commented Jan 24, 2025

One thing that could be causing this: to apply new changes to a background (or any preset, such as the AI presets), you have to select a different background preset and then re-select the one you changed. It's really annoying and we are planning to change it in the next release

@CaptnLucid
Copy link
Author

One thing that could be causing this: to apply new changes to a background (or any preset, such as the AI presets), you have to select a different background preset and then re-select the one you changed. It's really annoying and we are planning to change it in the next release

I did indeed do that, even did a full restart of the app, and for some reason, preset/backgrounds.json doesn't read local images, only presets/bg.json will. I don't know if it's just a random bug that only I am experiencing, or if it's something that others have been dealing with. However, the issue itself was resolved, but it's definitely something I think is good to look into.

@esimkowitz
Copy link
Member

Okay we've just checked in a fix for background images on Windows, we were doing some funky things when calculating the paths. This should go out with the main release, I don't think we'll do a beta for this fix.

@CaptnLucid
Copy link
Author

Okay we've just checked in a fix for background images on Windows, we were doing some funky things when calculating the paths. This should go out with the main release, I don't think we'll do a beta for this fix.

Awesome! Looking forward to the next release!

@esimkowitz
Copy link
Member

Okay @CaptnLucid v0.11 is now released, can you check if this solves the issue?

@CaptnLucid
Copy link
Author

Okay @CaptnLucid v0.11 is now released, can you check if this solves the issue?

Just upgraded and tested it. backgrounds.json and bg.json both work appropriately!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Needs triage
Projects
None yet
Development

No branches or pull requests

2 participants