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

Remove star, fix tz issue, and fix index.html #89

Merged
merged 2 commits into from
Jul 31, 2019
Merged

Conversation

landonreed
Copy link
Member

A couple of fixes:

  • remove stop viewer star button when user settings is disabled
  • fix undefined issue when homeTimezone config not set
  • add comment in index.html about which js to use

@codecov-io
Copy link

codecov-io commented Jul 31, 2019

Codecov Report

Merging #89 into dev will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff            @@
##             dev     #89      +/-   ##
========================================
- Coverage   6.36%   6.36%   -0.01%     
========================================
  Files        134     134              
  Lines       5997    6001       +4     
  Branches    1750    1753       +3     
========================================
  Hits         382     382              
- Misses      4747    4750       +3     
- Partials     868     869       +1
Impacted Files Coverage Δ
lib/components/viewers/stop-viewer.js 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79a865c...4d432b0. Read the comment docs.

<Icon type={this._isFavorite() ? 'star' : 'star-o'} />
</Button>
{showUserSettings
? <Button
Copy link
Contributor

Choose a reason for hiding this comment

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

You can just do showUserSettings && <Button... instead of using a ternary.

Copy link
Member Author

@landonreed landonreed Jul 31, 2019

Choose a reason for hiding this comment

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

Yea, I'm aware -- I was just kind of feeling the ternary here. Does this stand out as a major style concern to you? I use both, but I did like something I read recently that called out using ternaries in favor of && because it was more readable. Also, this: airbnb/javascript#520 (comment)

The [condition && <Button...] example looks cleanest, but it suffers from a footgun: if condition is zero, it will be toString'ed and rendered.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, that reminds me of https://stackoverflow.com/a/43375944/269834. Maybe if we care a lot about this, we can add a linting rule or something.

Copy link
Contributor

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

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

A few little requests, but good to go otherwise.

@evansiroky evansiroky assigned landonreed and unassigned evansiroky Jul 31, 2019
@landonreed landonreed assigned evansiroky and unassigned landonreed Jul 31, 2019
@evansiroky evansiroky assigned landonreed and unassigned evansiroky Jul 31, 2019
@landonreed landonreed merged commit e11b92f into dev Jul 31, 2019
@landonreed landonreed deleted the stop-viewer-fixes branch July 31, 2019 19:46
@landonreed landonreed mentioned this pull request Jul 31, 2019
@evansiroky
Copy link
Contributor

🎉 This PR is included in version 0.12.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants