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

Document icon.png #843

Merged
merged 3 commits into from
Jan 3, 2023
Merged

Document icon.png #843

merged 3 commits into from
Jan 3, 2023

Conversation

djbpitt
Copy link
Contributor

@djbpitt djbpitt commented Oct 24, 2022

The EXPath Package spec does not mention icon.png, but if the eXist-db Dashboard finds an image resource with a filename beginning with the string "icon" in the root directory of an app, it will display that instead of the default eXist-db blue dotted "X". See https://markmail.org/message/5m6fjqso4m4veuos

The EXPath Package spec does not mention icon.png, but if the
eXist-db Dashboard finds an image resource with a filename
beginning with the string "icon" in the root directory of an
app, it will display that instead of the default eXist-db blue
dotted "X". See
https://markmail.org/message/5m6fjqso4m4veuos
@adamretter
Copy link
Contributor

@djbpitt I was under the impression it had to be named icon.png... but I have never tested my assumption. Did you find that it worked for other types too?

@djbpitt
Copy link
Contributor Author

djbpitt commented Oct 24, 2022

@adamretter I did not test it with values other than icon.png. I copied the wording about filenames that begins with the string "icon" from Wolfgang's contribution to the mailing list (linked above). I had always shared your impression that the full filename had to be icon.png, and I've never tested anything else. I'm not able to test others right now, but I will be at some point in the next few weeks, and if you think it best, we can leave the PR open until I learn more and report back.

@joewiz
Copy link
Member

joewiz commented Oct 25, 2022

In 2014 @christophe-g added support for icon.svg. The code that displays icons now lives in https://github.com/eXist-db/existdb-packageservice/blob/master/modules/get-icon.xql - but support remains limited to png and svg.

@djbpitt We had a similar conversation in eXist-db/dashboard#178.

Comment on lines 99 to 102
<para>The following is not mentioned in the EXPath spec, but if an image resource with a
name that begins with the string <literal>icon</literal> is found in the root directory
of an app, the eXist-db dashboard will display that user-supplied image instead of the
default eXist-db blue dotted <literal>X</literal>.</para>
Copy link
Member

Choose a reason for hiding this comment

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

@djbpitt These are the lines containing the new contribution, correct? I just want to be sure I didn't miss anything in the other changes, which upon first glance appear to be whitespace-only.

Copy link
Contributor Author

@djbpitt djbpitt Oct 25, 2022

Choose a reason for hiding this comment

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

@joewiz Yes. The whitespace changes are a side-effect of pretty-printing in <oXygen/>. Should I have known of an easy way to exclude them from the commit? They certainly do make it harder to understand.

Copy link
Member

@joewiz joewiz Oct 25, 2022

Choose a reason for hiding this comment

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

@djbpitt No worries. To avoid this on repositories that don't have a coordinated whitespace policy, I apply format & indent to the element(s) I've edited instead of to the whole document. Right click on an element and from the contextual menu select Source > Format and Indent Element. Or from the menu bad select Document > Source > Format and Indent Element.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@joewiz Got it. Thank you. Another day, another feature I hadn’t known about …

Copy link
Contributor

Choose a reason for hiding this comment

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

see #637 running mvn clean package or mvn test will enforce a unified linting of all xml files.

@adamretter
Copy link
Contributor

@djbpitt i think this is a great contribution. Thank for your time. Maybe just add that it is for. Svg or. Png

@djbpitt
Copy link
Contributor Author

djbpitt commented Oct 26, 2022

@adamretter Done! Thank you!

@adamretter adamretter merged commit 214fdd8 into eXist-db:master Jan 3, 2023
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.

4 participants