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

Update Icons to new versions from design system #7593

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

olmoh
Copy link
Collaborator

@olmoh olmoh commented Feb 4, 2025

Replaces all icons in app with new ones from design system and modifies layouts to work with these changes.


This change is Reviewable

Copy link

linear bot commented Feb 4, 2025

@olmoh olmoh force-pushed the update-icons-in-app-to-latest-version-from-design-system-des-1648 branch from c6dd79c to e246858 Compare February 5, 2025 07:30
@olmoh olmoh force-pushed the update-icons-in-app-to-latest-version-from-design-system-des-1648 branch 2 times, most recently from 2902f57 to e6dd9b7 Compare February 5, 2025 12:50
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 137 files at r1, 33 of 36 files at r9, 34 of 173 files at r14, 172 of 204 files at r15, 1 of 2 files at r16, 34 of 34 files at r17, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @olmoh)


desktop/packages/mullvad-vpn/src/renderer/lib/components/icon-button/IconButton.tsx line 21 at r15 (raw file):

  large: 32,
  big: 48,
};

Are these supposed to be redefined here, or should they be shared with Icon.tsx? 😊

Code quote:

const sizes = {
  tiny: 12,
  small: 16,
  medium: 24,
  large: 32,
  big: 48,
};

desktop/packages/mullvad-vpn/src/renderer/components/ProblemReport.tsx line 236 at r15 (raw file):

      <StyledForm>
        <StyledStatusIcon>
          <Image source="icon-success" height={60} width={60} />

How come this is not an Icon element? 😊

Code quote:

<Image source="icon-success" height={60} width={60} />

@olmoh olmoh force-pushed the update-icons-in-app-to-latest-version-from-design-system-des-1648 branch from e6dd9b7 to cd43ce2 Compare February 5, 2025 13:39
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 3 files at r18, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @olmoh)

@olmoh olmoh force-pushed the update-icons-in-app-to-latest-version-from-design-system-des-1648 branch from cd43ce2 to 41d25f0 Compare February 7, 2025 08:56
Copy link
Collaborator Author

@olmoh olmoh left a comment

Choose a reason for hiding this comment

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

Reviewable status: 161 of 212 files reviewed, 2 unresolved discussions (waiting on @MarkusPettersson98)


desktop/packages/mullvad-vpn/src/renderer/components/ProblemReport.tsx line 236 at r15 (raw file):

Previously, MarkusPettersson98 (Markus Pettersson) wrote…

How come this is not an Icon element? 😊

My reasoning was to separate images and icons, and only calling icons that are part of the icon section of our design system icons. The rest are images, but I can see this being confusing. But I noticed we have a component called IconBadge in the design system that was not implemented and includes only these two images, icon-success and icon-fail. I implemented it and renamed the images to match the state names in the design system.


desktop/packages/mullvad-vpn/src/renderer/lib/components/icon-button/IconButton.tsx line 21 at r15 (raw file):

Previously, MarkusPettersson98 (Markus Pettersson) wrote…

Are these supposed to be redefined here, or should they be shared with Icon.tsx? 😊

Much better if they are shared, good suggestion, fixed!

Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

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

:lgtm: 🔥

Reviewed 51 of 51 files at r19, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


desktop/packages/mullvad-vpn/src/renderer/components/ProblemReport.tsx line 236 at r15 (raw file):

Previously, olmoh (Oliver Mohlin) wrote…

My reasoning was to separate images and icons, and only calling icons that are part of the icon section of our design system icons. The rest are images, but I can see this being confusing. But I noticed we have a component called IconBadge in the design system that was not implemented and includes only these two images, icon-success and icon-fail. I implemented it and renamed the images to match the state names in the design system.

Nice!


desktop/packages/mullvad-vpn/src/renderer/lib/components/icon-button/IconButton.tsx line 21 at r15 (raw file):

Previously, olmoh (Oliver Mohlin) wrote…

Much better if they are shared, good suggestion, fixed!

🎉

Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 3 files at r20, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


ios/convert-assets.rb line 137 at r20 (raw file):

    rsvg_convert("--width=#{width}", "--height=#{height}", "--format=pdf", svg_file, "--output", output_file)
  end
end

Should asset_dir be an argument, or is only ever ICON_ASSETS_DIR necessary? 😊

Code quote:

def generate_resized_assets()
  RESIZE_ASSETS.each do |asset_name, resize_options|
    (new_asset_name, width, height) = resize_options

    svg_file = File.join(ICON_ASSETS_DIR, asset_name)
    image_name = pascal_case(File.basename(new_asset_name, ".svg"))
    output_dir = File.join(XCASSETS_DIR, "#{image_name}.imageset")

    if !Dir.exists?(output_dir)
      puts "Create directory #{output_dir}"
      Dir.mkdir(output_dir)
    end

    output_file = File.join(output_dir, "#{image_name}.pdf")

    puts "Convert and resize #{svg_file} -> #{output_file} (#{width} x #{height})"
    rsvg_convert("--width=#{width}", "--height=#{height}", "--format=pdf", svg_file, "--output", output_file)
  end
end

@olmoh olmoh force-pushed the update-icons-in-app-to-latest-version-from-design-system-des-1648 branch from 51973e7 to 4f85be3 Compare February 11, 2025 13:59
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.

3 participants