Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.

Conversation

@thabti
Copy link
Contributor

@thabti thabti commented Jul 2, 2016

#341 Social media Share for Surah.

screen shot 2016-07-02 at 23 57 38

@ahmedre
Copy link
Contributor

ahmedre commented Jul 2, 2016

Deployed to: http://staging.quran.com:32787

@ahmedre
Copy link
Contributor

ahmedre commented Jul 2, 2016

Deployed to: http://staging.quran.com:32788

return (
<div className={Style.share}>

<i onClick={()=> this.onClickPopup(facebookUl, "Facebook")}
Copy link
Contributor

Choose a reason for hiding this comment

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

facebookUrl misspelled :)

@mmahalwy
Copy link
Contributor

mmahalwy commented Jul 2, 2016

dw about this: https://travis-ci.org/quran/quran.com-frontend/builds/141903708#L415

it will get fixed soon!

@@ -0,0 +1,30 @@
.share {
Copy link
Contributor

Choose a reason for hiding this comment

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

+0
It's great that U did not use any useless css attribute/property but we can improve code by using DRY principle and module specific css selector(that support future extension)

.surah-share{
  &-container{
     position: relative;
     bottom: 2px;
     left: 5px;
  }
 &-icon{
   background-repeat: no-repeat;
   padding-right: 30px;
   background-size: 12px;
   padding-bottom: 10px;
   padding-top: 1px;
 }
 &-facebook{
    @extend .surah-share-icon;
    background-image: url(../../../static/images/FB-grn.png);
    &:hover{
      background-image: url(../../../static/images/FB-beige.png); 
    }
  }
   &-twitter{
    @extend .surah-share-icon;
    background-image: url(../../../static/images/Twitter-grn.png);
    &:hover{
      background-image:  url(../../../static/images/Twitter-beige.png); 
    }
  }
} 

Some benefits of above approach:

  • code readability
  • css size is reduced
  • if implement share functionality at different level(e.g. Ayah level), we can define a different select(e.g. ayah-share-facebook) without conflicting with a generic .facebook selector.

Copy link
Contributor Author

@thabti thabti Jul 2, 2016

Choose a reason for hiding this comment

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

greats tips bro. I have since update the code to introduce font-awesome as @mmahalwy suggested. Please review again and let me know.

The project uses css-module, which doesn't lend it self to nested css.

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry, i did not get " css-module", i am thinking that we are using SCSS that support nesting, right?

http://sass-lang.com/guide#topic-3

@ahmedre
Copy link
Contributor

ahmedre commented Jul 2, 2016

Deployed to: http://staging.quran.com:32790

@ahmedre
Copy link
Contributor

ahmedre commented Jul 2, 2016

Deployed to: http://staging.quran.com:32791

@thabti thabti force-pushed the feature/341-social-share branch from c70e607 to 317a814 Compare July 2, 2016 23:04
@ahmedre
Copy link
Contributor

ahmedre commented Jul 2, 2016

Deployed to: http://staging.quran.com:32792

@thabti thabti force-pushed the feature/341-social-share branch from 317a814 to 8c05817 Compare July 2, 2016 23:06
@ahmedre
Copy link
Contributor

ahmedre commented Jul 2, 2016

Deployed to: http://staging.quran.com:32793

@@ -0,0 +1,2199 @@
/*!
Copy link
Contributor

Choose a reason for hiding this comment

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

forgive me, I made a mistake. I thought we already had fontawesome in the code base but we don't Let's go back to what you had earlier with the images. I am so sorry again!

Copy link
Contributor

Choose a reason for hiding this comment

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

I will suggest to use svg images for icon stuff.

But that is true that technology stack is confusing e.g. i spent time to figure out that .navbar is part of boostrap and we are using bootstrapUI.

So i thought to to add technology stack in "contributing.md" for future reference

e.g.

HTML - Plain HTML + Reactjs Component
CSS - SCSS + Bootstrap
Client-Side JS - Reactjs+Redux
Server-side JS - Express

right?

then i have a question, not sure to ask that here.

which browser stack we are supporting? because usage of HTML/CSS/JS is really dependent on that stack, and will help developers and code-reviewers to evaluate a solution. Thanks

Copy link
Contributor Author

@thabti thabti Jul 3, 2016

Choose a reason for hiding this comment

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

@mahboob-awan agreed. I think slack or skype would be ideal play to discuss these things.

@thabti thabti force-pushed the feature/341-social-share branch from 8c05817 to eb8f1dd Compare July 3, 2016 01:06
@ahmedre
Copy link
Contributor

ahmedre commented Jul 3, 2016

Deployed to: http://staging.quran.com:32795

@thabti
Copy link
Contributor Author

thabti commented Jul 3, 2016

@mmahalwy reverted back to images.

@mmahalwy
Copy link
Contributor

mmahalwy commented Jul 3, 2016

Thank you @sabeurthabti

@mmahalwy mmahalwy merged commit 1e10b98 into quran:develop Jul 3, 2016
mmahalwy added a commit that referenced this pull request Jul 10, 2016
* HOTFIX reading mode markers (#303)

* Default api and files (#306)

* Reducing bundle size (#310)

* Reducing bundle size

* rearranged files

* more rearrange and deleted unneeded files

* add default segments key (#313)

* transitioning to al-quran al-kareem (#314)

transitioning to Al-Quran al-Kareem

* Fix lint issues

* Update Readme.md

* Add devDependency Status

* Update Readme for new developers

* Code splitting assets (#321)

* Code splitting

* Split the html files into their own and ajax requested

* Pass tests

* Wrong files

* Add segments

* Add segments

* Autocomplete pointing to v2 suggest

* HOTFIX pretty-error dep (#323)

* HOTFIX Search to the right route (#324)

* No segments for non-segmented reciters (#325)

* Adding sentry (#327)

* CDN images for surahinfo (#328)

* Reduce data dehydration (#329)

* Search Action on homepage (#330)

* Descriptions for surahs (#331)

* Fixed head tags (#332)

* Head tags improved and more organized

* Fixed the head problem

* audioplayer bug fixes, or more bugs (#335)

* audioplayer bug fixes, or more bugs

* removes some unneeded state things in audioplayer redux, also fixes a bug where event listeners would get bound without properly unbinding multiple times, which caused the player to skip ayahs after using next <-> prev more then once on the same ayah

* temporarily disables word focusing capacity

* Add sourcemaps to prod

* Remove zero padding in urls

* (WIP) Issue #248 (#336)

Fixes #248 Out of range bug

* correct waffle url. (#338)

* JS error on surah click (#349)

* Add Heroku generated app.json

* Ramadan Todo list (#343)

* Change

* Eslint added (#345)

* Eslint added

* eslint in travis

* ayah require

* Fixed

* fixed bug that was preventing ayah transition on audioplayer

* fix autocomplete thing

* Extract connect from the surah container (#347)

* Fout fonts (#346)

* Fout fonts

* wip

* wip2

* do not update

* pass tests

* Sourcemap for sentry (#352)

* contribution guideline (#355)

* Heroku pipeline trials (#354)

* push

* push

* push

* push

* push

* Heroku push (#356)

* Heroku push

* public urls

* Add zendesk widget (#358)

* Fix font artifacts

This fixes #365 by merging the 3 fonts from quran/quran.com-images#7,
quran/quran.com-images#8, and quran/quran.com-images#9.

* Update font for page 237 to fix spacing in 12:17

This fixes the spacing issue in 12:17 by updating the font. Fixes #369.

* Feature/341 social share (#367)

* Add zendesk widget (#358)

*  The first commit's message is:

* Simplify audioplayer (#360)

* Audioplayer refactor

* more reshuffling

* move logic outside of tracker

* fixes #359

* eslint

* refactor and works

* Added segments

* Fix navigating from home to surah

* reciter change

* on word click working!

* segments encryption and lazy decryption

* encryption lib

* linter is happy

* unit tests

* env

* Fix sentry bug (#373)

* Fix sentry bug

* no build

* #372 colon separated surah/ayah (#374)

* #372 colon separated surah/ayah

* #372 colon separated surah/ayah

* #372 colon separated surah/ayah

* Re-output fonts with Apple option enabled

This probably doesn't matter for web, but it may matter for apps in the
future, plus wanted to keep in sync with the versions of the fonts used
by quran/quran.com-images.

* Tooltip options for translation and transliteration (#376)

* Reading mode single line (#377)

* - ayah's have link (discuss, maybe not needed) (#379)

- Fix audio player playing text
- Remove unneeded padding on mobile
- Hide Share on mobile devices (native share is built into the browsers)

* Added Mixpanel (#384)

* Remove footer links (#385)

* Remove footer links

* eslint

* Fix json-ld (#386)
@mahboob-awan
Copy link
Contributor

@mmahalwy are we using paid version of https://symbolset.com/icons/standard?

see Usage

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants