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.svg size (-93B) #9106

Merged
merged 5 commits into from
Dec 22, 2023

Conversation

goyalyashpal
Copy link
Contributor

@goyalyashpal goyalyashpal commented Dec 18, 2023

pretty logo chore(logo): PrettyPrint to reduce size by 93B ...

  • Current size: 2,755 B
  • Original size: 2,848 B
  • Add file's final newline (linux convention)
  • Remove tag separator spaces
  • Add newlines
  • Add tab indentation (instead of 2/4 spaces)
  • Prettify root svg's attribs

  * Current size:  2,755 B
  * Original size: 2,848 B
  * Add file's final newline (linux convention)
  * Remove tag separator spaces
  * Add newlines
  * Add tab indentation (instead of 2/4 spaces)
  * Prettify root svg's attribs
@goyalyashpal goyalyashpal marked this pull request as draft December 18, 2023 01:43
@goyalyashpal goyalyashpal reopened this Dec 18, 2023
@goyalyashpal goyalyashpal changed the title chore(logo): PrettyPrint to reduce size by 93B ... Reduce sizes (-93B -651B) Dec 18, 2023
@goyalyashpal goyalyashpal changed the title Reduce sizes (-93B -651B) Reduce sizes (-93B -322B) Dec 18, 2023
@goyalyashpal goyalyashpal changed the title Reduce sizes (-93B -322B) Reduce sizes (-93B -325B -323B) Dec 18, 2023
@goyalyashpal goyalyashpal changed the title Reduce sizes (-93B -325B -323B) Reduce logo sizes (-93B -325B -323B) Dec 18, 2023
@NewtonChutney
Copy link
Contributor

NewtonChutney commented Dec 18, 2023

Maybe we could move the clutter at the root too? 😅🥲

@goyalyashpal goyalyashpal force-pushed the reduce-size-pretty-logo branch 2 times, most recently from f3df996 to a162594 Compare December 18, 2023 05:51
@goyalyashpal goyalyashpal changed the title Reduce logo sizes (-93B -325B -323B) Reduce logo.svg size (-93B) Dec 18, 2023
@goyalyashpal goyalyashpal marked this pull request as ready for review December 18, 2023 05:52
@the-mikedavis
Copy link
Member

As we said in #5941 we're not interested in pretty printing this.

I think it'd be fine to minify the logo.svg file a little more by removing all whitespace. I see that getting the file down to 2665 bytes.

@goyalyashpal
Copy link
Contributor Author

it's ready @the-mikedavis

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

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

Let's chop off the trailing line ending too so we don't have any unnecessary whitespace

@goyalyashpal
Copy link
Contributor Author

Let's chop off the trailing line ending too so we don't have any unnecessary whitespace

the final newline defines a file on linux. so many utils depend on a file having it.

is there any bad effect of it somewhere?

@the-mikedavis
Copy link
Member

The trailing newline is just a convention from the posix standard about the definition of lines. I doubt you could find a tool that deals with SVGs that is broken by a file lacking a trailing newline. It's just extra whitespace that we don't need for a minified file we're basically treating as binary. Plus, the line-ending on this branch is currently a CRLF.

In order to save this without a line ending you'll need to delete the line ending and then turn off the behavior from #8157 with :set insert-final-newline false and then save.

@goyalyashpal
Copy link
Contributor Author

goyalyashpal commented Dec 21, 2023

uh oh, i guess no changes were made

lemme retry

@goyalyashpal
Copy link
Contributor Author

yeah, i guess it is done now

logo.svg Outdated Show resolved Hide resolved
@archseer archseer merged commit d5e6749 into helix-editor:master Dec 22, 2023
6 checks passed
@goyalyashpal goyalyashpal deleted the reduce-size-pretty-logo branch December 22, 2023 08:36
mmlb added a commit to mmlb/helix-editor-helix that referenced this pull request Jan 2, 2024
While reading through commits to helix I saw
helix-editor#9106 and wondered if the
relatively-new-to-me svgo would do better than -95B diff, indeed it
does. Seeing as this file is "a minified file we're basically treating
as binary" anyway I figured might as well minify it further.
@mmlb mmlb mentioned this pull request Jan 2, 2024
pascalkuthe pushed a commit that referenced this pull request Jan 2, 2024
* Reduce logo.svg even more

While reading through commits to helix I saw
#9106 and wondered if the
relatively-new-to-me svgo would do better than -95B diff, indeed it
does. Seeing as this file is "a minified file we're basically treating
as binary" anyway I figured might as well minify it further.

* Minimize all the svg logos
woojiq pushed a commit to woojiq/helix that referenced this pull request Jan 13, 2024
* Reduce logo.svg even more

While reading through commits to helix I saw
helix-editor#9106 and wondered if the
relatively-new-to-me svgo would do better than -95B diff, indeed it
does. Seeing as this file is "a minified file we're basically treating
as binary" anyway I figured might as well minify it further.

* Minimize all the svg logos
dgkf pushed a commit to dgkf/helix that referenced this pull request Jan 30, 2024
* chore(logo): PrettyPrint to reduce size by 93B ...

  * Current size:  2,755 B
  * Original size: 2,848 B
  * Add file's final newline (linux convention)
  * Remove tag separator spaces
  * Add newlines
  * Add tab indentation (instead of 2/4 spaces)
  * Prettify root svg's attribs

* style(logo): Bring style attrb to front

* chore(logo): Remove tab characters

* chore(logo): Remove \n, use LF as final newline

* chore(logo): Minify logo.svg ...

  * Remove final newline too
dgkf pushed a commit to dgkf/helix that referenced this pull request Jan 30, 2024
* Reduce logo.svg even more

While reading through commits to helix I saw
helix-editor#9106 and wondered if the
relatively-new-to-me svgo would do better than -95B diff, indeed it
does. Seeing as this file is "a minified file we're basically treating
as binary" anyway I figured might as well minify it further.

* Minimize all the svg logos
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
* chore(logo): PrettyPrint to reduce size by 93B ...

  * Current size:  2,755 B
  * Original size: 2,848 B
  * Add file's final newline (linux convention)
  * Remove tag separator spaces
  * Add newlines
  * Add tab indentation (instead of 2/4 spaces)
  * Prettify root svg's attribs

* style(logo): Bring style attrb to front

* chore(logo): Remove tab characters

* chore(logo): Remove \n, use LF as final newline

* chore(logo): Minify logo.svg ...

  * Remove final newline too
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
* Reduce logo.svg even more

While reading through commits to helix I saw
helix-editor#9106 and wondered if the
relatively-new-to-me svgo would do better than -95B diff, indeed it
does. Seeing as this file is "a minified file we're basically treating
as binary" anyway I figured might as well minify it further.

* Minimize all the svg logos
Vulpesx pushed a commit to Vulpesx/helix that referenced this pull request Jun 7, 2024
* chore(logo): PrettyPrint to reduce size by 93B ...

  * Current size:  2,755 B
  * Original size: 2,848 B
  * Add file's final newline (linux convention)
  * Remove tag separator spaces
  * Add newlines
  * Add tab indentation (instead of 2/4 spaces)
  * Prettify root svg's attribs

* style(logo): Bring style attrb to front

* chore(logo): Remove tab characters

* chore(logo): Remove \n, use LF as final newline

* chore(logo): Minify logo.svg ...

  * Remove final newline too
Vulpesx pushed a commit to Vulpesx/helix that referenced this pull request Jun 7, 2024
* Reduce logo.svg even more

While reading through commits to helix I saw
helix-editor#9106 and wondered if the
relatively-new-to-me svgo would do better than -95B diff, indeed it
does. Seeing as this file is "a minified file we're basically treating
as binary" anyway I figured might as well minify it further.

* Minimize all the svg logos
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
* chore(logo): PrettyPrint to reduce size by 93B ...

  * Current size:  2,755 B
  * Original size: 2,848 B
  * Add file's final newline (linux convention)
  * Remove tag separator spaces
  * Add newlines
  * Add tab indentation (instead of 2/4 spaces)
  * Prettify root svg's attribs

* style(logo): Bring style attrb to front

* chore(logo): Remove tab characters

* chore(logo): Remove \n, use LF as final newline

* chore(logo): Minify logo.svg ...

  * Remove final newline too
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
* Reduce logo.svg even more

While reading through commits to helix I saw
helix-editor#9106 and wondered if the
relatively-new-to-me svgo would do better than -95B diff, indeed it
does. Seeing as this file is "a minified file we're basically treating
as binary" anyway I figured might as well minify it further.

* Minimize all the svg logos
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