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

Reduce logo size #93

Assignees
Labels

Comments

@llrs-roche
Copy link

What happened?

As part of #87 the task is to reduce the logo size for all packages.

Thanks to @gogonzo that pointed me to https://github.com/insightsengineering/hex-stickers we can replace .png by the svg or the smallest logo.

According to a search there are ~30-40 logos but on the repository linked above it shows less logos (or it might show these logos as results)...

For formatters and rtables I've used: https://compresspng.com/ and https://www.iloveimg.com/compress-image/compress-png to reduce from ~2Mb to 0.5Mb

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@llrs-roche
Copy link
Author

llrs-roche commented Dec 17, 2024

Omitting some general/team logos and focusing on R-packages there are 10 that have svg (vectorized format of smaller size than png). Marked are those with PR merged to update the files and materials that use it (README.Rmd, vignettes, pkgdown, ...)

The following packages would need updates to svg format (the same as above) and add them to hex-stickers repository but with all the formats (checked are PR to have the svg logo on the package and PR to the hex-sticker repo to add the different formats):

In total ~20 packages

llrs-roche added a commit to insightsengineering/teal that referenced this issue Dec 18, 2024
# Pull Request

Replace the logo.png by logo.svg (11kb spared). 

Fixes insightsengineering/nestdevs-tasks#93

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
llrs-roche added a commit to insightsengineering/rtables that referenced this issue Dec 18, 2024
# Pull Request

Replace the logo.png by logo.svg to reduce the package size (500Kb to
156Kb for the logo).

Apparently the svg is not picked up by roxygen2 to be shown on
rtables-package.Rd.

Fixes insightsengineering/nestdevs-tasks#93
llrs-roche added a commit to insightsengineering/formatters that referenced this issue Dec 18, 2024
# Pull Request

Replace the logo.png by logo.svg to reduce much more than the previous
compressions of png on #329: (500Kb -> 70Kb) and it is vectorized to
allow for any resolution.

Fixes insightsengineering/nestdevs-tasks#93
llrs-roche added a commit to insightsengineering/chevron that referenced this issue Dec 18, 2024
# Pull Request

Replace the logo.png by logo.svg to reduce package's size (This is
relevant for CRAN submissions were packages cannot be generally >5Mb of
source code and get flagged for CRAN reviewer if they exceed this
number).

Important: the logo appears to be different: there is some green pattern
on the SVG that is not on other logo formats.

This package makes use of Github actions to check the branding, replaced
there too.

Fixes insightsengineering/nestdevs-tasks#93
@llrs-roche
Copy link
Author

Updates about the progress:

About adding the svg logos available on hex-stickers:

  • mmrm is outside this organization, worth adding it?
  • sasr already has a svg logo : sasr-logo.svg not sure if renaming is worth it.
  • scda is archived

About converting png to svg for the other packages

The tool that worked best at the moment is: freeconverter, just upload the png and download the svg. Probably it can be used to create the ICO for https://github.com/insightsengineering/hex-stickers.

@llrs-roche
Copy link
Author

llrs-roche commented Dec 20, 2024

To provide the svg logos I sent a PR (together with Marcin) to hex-stickers: insightsengineering/hex-stickers#39

rbmi and hermes already used svg logo.
I won't modify the rtables.officer hoping it gets its own logo.
All other packages had their PR to reduce size regarding logos: some of them was just to remove png files.
This issue can be closed when all the PR are merged (or rejected) unless new issues arise..

@llrs-roche llrs-roche self-assigned this Dec 20, 2024
m7pr pushed a commit to insightsengineering/ggplot2.utils that referenced this issue Dec 23, 2024
This replaces the png logo by the new generated svg logo (see
insightsengineering/hex-stickers#39) to a slight
reduction on package size.

Related to
insightsengineering/nestdevs-tasks#93



![image](https://github.com/user-attachments/assets/220eda56-b5e5-4a30-b5a7-6d8cce871a6d)
m7pr pushed a commit to insightsengineering/cards that referenced this issue Dec 23, 2024
**What changes are proposed in this pull request?**
Use svg logo instead of the png to reduce package size

This is in reference to
insightsengineering/nestdevs-tasks#93
The logo was generated with the script at:
insightsengineering/hex-stickers#39


![image](https://github.com/user-attachments/assets/acdbc13c-7068-4454-9ac6-0dd73463360e)




--------------------------------------------------------------------------------

Pre-review Checklist (if item does not apply, mark is as complete)
- [ ] **All** GitHub Action workflows pass with a ✅
- [x] PR branch has pulled the most recent updates from master branch:
`usethis::pr_merge_main()`
- [x] If a bug was fixed, a unit test was added.
- [x] Code coverage is suitable for any new functions/features
(generally, 100% coverage for new code): `devtools::test_coverage()`
- [x] Request a reviewer

Reviewer Checklist (if item does not apply, mark is as complete)

- [ ] If a bug was fixed, a unit test was added.
- [ ] Run `pkgdown::build_site()`. Check the R console for errors, and
review the rendered website.
- [ ] Code coverage is suitable for any new functions/features:
`devtools::test_coverage()`

When the branch is ready to be merged:
- [ ] Update `NEWS.md` with the changes from this pull request under the
heading "`# cards (development version)`". If there is an issue
associated with the pull request, reference it in parentheses at the end
update (see `NEWS.md` for examples).
- [ ] **All** GitHub Action workflows pass with a ✅
- [ ] Approve Pull Request
- [ ] Merge the PR. Please use "Squash and merge" or "Rebase and merge".
m7pr pushed a commit to insightsengineering/cardx that referenced this issue Dec 23, 2024
**What changes are proposed in this pull request?**
Uses svg logo instead of the png to reduce package size

This is in reference to
insightsengineering/nestdevs-tasks#93
The logo was generated with the script at:
insightsengineering/hex-stickers#39



--------------------------------------------------------------------------------

Pre-review Checklist (if item does not apply, mark is as complete)
- [x] **All** GitHub Action workflows pass with a ✅
- [x] PR branch has pulled the most recent updates from master branch:
`usethis::pr_merge_main()`
- [x] If a bug was fixed, a unit test was added.
- [x] If a new `ard_*()` function was added, it passes the ARD
structural checks from `cards::check_ard_structure()`.
- [x] If a new `ard_*()` function was added, `set_cli_abort_call()` has
been set.
- [x] If a new `ard_*()` function was added and it depends on another
package (such as, `broom`), `is_pkg_installed("broom")` has been set in
the function call and the following added to the roxygen comments:
`@examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg =
"broom""))`
- [x] Code coverage is suitable for any new functions/features
(generally, 100% coverage for new code): `devtools::test_coverage()`

Reviewer Checklist (if item does not apply, mark is as complete)

- [ ] If a bug was fixed, a unit test was added.
- [ ] Code coverage is suitable for any new functions/features:
`devtools::test_coverage()`

When the branch is ready to be merged:
- [ ] Update `NEWS.md` with the changes from this pull request under the
heading "`# cardx (development version)`". If there is an issue
associated with the pull request, reference it in parentheses at the end
update (see `NEWS.md` for examples).
- [ ] **All** GitHub Action workflows pass with a ✅
- [ ] Approve Pull Request
- [ ] Merge the PR. Please use "Squash and merge" or "Rebase and merge".
@m7pr
Copy link

m7pr commented Dec 23, 2024

I think we are good @llrs-roche and are ready to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment