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

adds popup header and adds browserify-css and tachyons #319

Merged
merged 6 commits into from
Nov 28, 2017

Conversation

alanshaw
Copy link
Member

@alanshaw alanshaw commented Nov 28, 2017

This is the popup UI component, as per the mockups. It's possible for this PR to be merged and released as is.

This adds a header to the popup displaying the IPFS icon (online/offline):

screen shot 2017-11-28 at 13 26 55

screen shot 2017-11-28 at 13 27 11

This also add the HTML code and CSS for the proposed embedded/external toggle but the component is currently display: none. It'll become visible when JS IPFS is added to the project.

screen shot 2017-11-28 at 13 28 13

I've added browserify-css to allow us to require CSS files and added tachyons to give us consistent spacing, font sizes and ways of composing styles for components without bloating CSS (and is also consistent with other IPFS sites https://peerpad.net https://ipld.io). I've actually been able to remove all the styles in the browser action popup as they can all be expressed using tachyons atoms.

@@ -0,0 +1,172 @@
/*!
Copy link
Member

Choose a reason for hiding this comment

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

No module available for mdc.switch.css ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@material/switch - but it only allows you to override the "on" state:

It is not currently possible to customize the color of a disabled or off (unchecked) switch
https://www.npmjs.com/package/@material/switch#sass-mixins

Our "off" state is the same as our "on" state (visually), we're not so much on/off as left/right so I needed to edit the CSS a little to achieve this.

@alanshaw alanshaw requested a review from lidel November 28, 2017 15:38
This was referenced Nov 28, 2017
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

LGTM 👍

PS. the header felt bit lonely without stars, so I've restored/improved heartbeat animation:

peek 2017-11-28 22-46

@lidel lidel merged commit 287b357 into ipfs:master Nov 28, 2017
@alanshaw alanshaw deleted the ui-updates branch November 29, 2017 08:51
@alanshaw
Copy link
Member Author

Nice, I like it!

@lidel
Copy link
Member

lidel commented Nov 29, 2017

If anyone wants to smoke-test refreshed GUI under Firefox, there is a new beta in Development channel:
https://addons.mozilla.org/en-US/firefox/addon/ipfs-companion/versions/beta

In my case it works well, even with layout.css.devPixelsPerPx bigger than 1.0 (HiDPI screens) 👍

@richardschneider
Copy link

Fails to load in Firefox 55.0.3 (32-bit)
companion

@lidel
Copy link
Member

lidel commented Nov 30, 2017

@richardschneider I am afraid we switched min. version to Firefox 57,
older versions lacked some APIs on Android (#109 (comment)).

I see it is possible to set different range for desktop and mobile,
so I've just manually switched min. version for desktop to "55".

Try again 🙂

@richardschneider
Copy link

richardschneider commented Nov 30, 2017

Fast work, thanks it now loads and works (in a smoke test).

However, WebUI seems broken, no data is displayed.

webui

@lidel
Copy link
Member

lidel commented Nov 30, 2017

The issue you are experiencing is not related to ipfs-companion, I think.

I am using the beta with go-ipfs/0.4.13/cc01b7f and WebUI loads fine.
Try to update to 0.4.13 if you are not using it already.

If the problem persists, report it at https://github.com/ipfs/webui/issues

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.

None yet

4 participants