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

Change font-family of texts in labels #16079

Closed
bastian-albaut opened this issue Jan 15, 2025 · 16 comments
Closed

Change font-family of texts in labels #16079

bastian-albaut opened this issue Jan 15, 2025 · 16 comments

Comments

@bastian-albaut
Copy link

Hello,
Is it possible to change the font-family of texts in labels ?

Here is my label :
image

Basically, I want to change the font family of each attributes and values.
I tried to customize the CSS in Admin > Branding > Custom CSS but there is no changes apply.

Thank you in advance for your help.

Copy link

welcome bot commented Jan 15, 2025

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@swift2512
Copy link

I believe you need to manually edit label files for this

@bastian-albaut
Copy link
Author

The label file is in the configuration of Snipe IT where I installed it ?

@swift2512
Copy link

You will find these files in app/Models/Labels You should save your custom labels with new file names to avoid overwrites when upgrading.

@snipe
Copy link
Owner

snipe commented Jan 16, 2025

@swift2512 this is generally a very bad idea. If you upgrade via git (the recommended way), you will have to re-apply your changes each time you upgrade, or your changes will be lost. You should generally never change files that are already checked into the filesystem.

@snipe
Copy link
Owner

snipe commented Jan 16, 2025

@bastian-albaut are you using the new label engine or old? What version of Snipe-IT are you using?

@bastian-albaut
Copy link
Author

I'am using the new label engine and the Snipe-IT version is v7.1.15 build 16052 (g25bfd3e84)

@swift2512
Copy link

swift2512 commented Jan 17, 2025

@snipe looks like you missed that part where I wrote You should save your custom labels with new file names to avoid overwrites when upgrading. :) I have made custom label, named it correctly and it survived all upgrades from 7.0.x up til 7.1.15.

(What doesn't survive - my edits in resources/views/users/edit.blade.php file where I hide access to user permission table from anyone without Admin or Super-user rights ;) )

@bastian-albaut
Copy link
Author

Yeah maybe it can be a solution for me.
Thanks @swift2512 !

@snipe
Copy link
Owner

snipe commented Jan 17, 2025

@swift2512 I didn’t miss that - if you use a git install, which is what we always recommend, a new file in that directory will still show up as a change in git, and will prevent it from upgrading cleanly unless you copy it over from somewhere else each time, which is messy at best.

@swift2512
Copy link

@swift2512 I didn’t miss that - if you use a git install, which is what we always recommend, a new file in that directory will still show up as a change in git, and will prevent it from upgrading cleanly unless you copy it over from somewhere else each time, which is messy at best.

@snipe what's wrong with git stash?

@snipe
Copy link
Owner

snipe commented Jan 17, 2025

Nothing, if you remember to do it and know how, and as long as changes we made won’t cause conflicts. It’s obviously what we recommend if people are going to make local changes, but a lot of people don’t know git very well and recommending things they don’t know well can end up messing up their install.

Not to mention the person who eventually replaces them in their role will have to know to do it as well.

@swift2512
Copy link

Nothing, if you remember to do it and know how, and as long as changes we made won’t cause conflicts. It’s obviously what we recommend if people are going to make local changes, but a lot of people don’t know git very well and recommending things they don’t know well can end up messing up their install.

Not to mention the person who eventually replaces them in their role will have to know to do it as well.
First overwrite and they will learn their lesson. :) I keep a log of every changes I made and especially of things I don't understand well. In case of labels, mine are moved to folder next to 'Sheets' and 'Tapes'.

@snipe
Copy link
Owner

snipe commented Jan 17, 2025

“They will learn their lesson” is not a viable plan, and we over here still end up having to try to bail them out here when their install “breaks”.

If people know git well enough, they can fork the repo and maintain their own fork, merging our changes in. We don’t expect people, especially IT people, to have that knowledge.

Please just stop arguing about this. 11 years I’ve been supporting this project.

If the OP wants to try git stashes (assuming it’s even a git install, which it might not be) they are certainly welcome to, however making sweeping recommendations causes us more problems, since we don’t know what people know how to do, what they’re capable of automating, etc.

@swift2512
Copy link

Don't need to be that dramatic. :) At most what OP can loose is a custom label - not a big deal. And if OP is familiar with good practices - uses some sort of backup solution and all disasters are reversible.

@snipe
Copy link
Owner

snipe commented Jan 17, 2025

I’m not being dramatic. You don’t know whether it’s a big deal, and frankly, arguing on this thread about it is ridiculous. Just stop.

@snipe snipe closed this as completed Jan 17, 2025
Repository owner locked as off-topic and limited conversation to collaborators Jan 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants