Skip to content

Font Awesome added#26

Merged
mattxwang merged 10 commits into
masterfrom
font-awesome
Apr 16, 2019
Merged

Font Awesome added#26
mattxwang merged 10 commits into
masterfrom
font-awesome

Conversation

@utsavm9

@utsavm9 utsavm9 commented Apr 10, 2019

Copy link
Copy Markdown
Contributor

As instructed on Font Awesome page, the Font Awesome package has been added.

The Hamburger icon is in 🍔! It changes to panel collapse panel when the panel is wide open.
The panel close button inside the panel is removed.

@mattxwang mattxwang self-requested a review April 10, 2019 16:41

@mattxwang mattxwang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey Utsav,

This PR failed the Travis build (our CI that auto-builds the project) - specifically, you're declaring a variable you're not using:

./src/components/Editor/components/ProfilePanel.js
  Line 10:  'FontAwesomeIcon' is defined but never used  no-unused-vars

I'll also double-check your FA implementation later, but see if you can fix this PR so it doesn't break Travis. You can double-check it by running npm run build with no errors or warnings.

@utsavm9 utsavm9 self-assigned this Apr 11, 2019
@utsavm9 utsavm9 requested a review from mattxwang April 11, 2019 22:51

@connorbo97 connorbo97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left some comments, needs some tweakin

Comment thread src/styles/Editor.css Outdated
cursor: pointer;
flex: 0 1 auto;
width: 20px;
transition: 1s;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what does this transition do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Transition was originally added when the bars turned slowly into a cross. But now I have seen the result after removing the transition and since the transition is unnoticeable, I'll remove this.

Comment thread src/styles/Panel.css

@mattxwang mattxwang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Big thing: please explicitly import each icon rather than building a library. It should be much better for performance. It is slightly more tedious, but it should help out a lot more.

Check up my and Connor's suggested changes. I think in the future we should phase out the other icons we have on the site and use just FA5, which should in theory be better for performance.

As for @connorbo97 's concern about performance, it's pretty valid - we're adding essentially a non-trivial amount of kb to our web app to have nice looking icons. I do think that the typographical modifiers that we'll gain by having icon fonts will benefit us in the long run, especially as we create the sketches page, add more components, etc. Worst case scenario, we can always "eject" our of FA5 if needed with only a bit of work.

Comment thread src/components/Editor/components/Main.js
@mattxwang

Copy link
Copy Markdown
Member

@connorbo97 the idea is to use tree-shaking - take a look at the article, though I'm not sure how much we'd like to rework / if we need to eject.

@utsavm9

utsavm9 commented Apr 16, 2019

Copy link
Copy Markdown
Contributor Author

Is tree-shaking enabled in the production build just by including Rollup.js? Till then, I'll use deep-imports to help reduce the size of Font Awesome package.

@mattxwang

Copy link
Copy Markdown
Member

We don't need to add any more things to the build haha, I believe that we'll have generic optimization by just importing what we need with explicit importing.

@utsavm9

utsavm9 commented Apr 16, 2019

Copy link
Copy Markdown
Contributor Author

A took a look at the stable build and I feel it would be user-eye-friendly if on hovering overt the panel buttons, the cursor did not change to a edit-bar which is indistinguishable from the button background.

@utsavm9 utsavm9 requested a review from mattxwang April 16, 2019 08:01

@mattxwang mattxwang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay Utsav, this looks better. In the future, I'd recommend that you avoid mixing multiple changes into one PR (i.e. the cursor hover stuff) so that we can better see what changes have been made and when. (also I imagine that it'd be better if the cursor changed to a button hover, rather than the default. We can fix this later).

@mattxwang mattxwang merged commit 72afd46 into master Apr 16, 2019
@mattxwang mattxwang deleted the font-awesome branch April 16, 2019 18:16
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