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

Feature tweet popup #32

Merged
merged 3 commits into from
Jul 16, 2022
Merged

Feature tweet popup #32

merged 3 commits into from
Jul 16, 2022

Conversation

rtomitani
Copy link
Contributor

Shareボタン押下時に、Tweetのウィンドウを小さいポップアップで表示するようにしました。
(Slackで話題に出されていた件です)
これが想定されている仕様かわかりませんが、とりあえず作ってみました。

image

@github-actions
Copy link

github-actions bot commented Jun 22, 2022

Visit the preview URL for this PR (updated for commit 768d57f):

https://nounsmap-web-dev--pr32-feature-tweet-popup-gw4jh0yj.web.app

(expires Thu, 21 Jul 2022 23:02:57 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

const openTweetPopup = (photoId: string) => {
const url = 'https://twitter.com/intent/tweet?url=https://' + nounsMapConfig.hostName + '/p/' + photoId;
const width = 400, height = 300;
const params = `scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,
Copy link
Collaborator

Choose a reason for hiding this comment

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

yarn format の実行をお願いします

Copy link
Collaborator

@kozayupapa kozayupapa left a comment

Choose a reason for hiding this comment

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

ありがとうございます!
中島さんのiframeのpopup のイメージと同じかは自信がないのですが、
動作としては問題ないと思います。

@kozayupapa
Copy link
Collaborator

@rtomitani 気になったので、 iframe で作るpopup の sample を探しました。
下記のような動作を意図しているのだと思われます。 可能であればiframe版も作っていただけますか?
windowがmodal的に開けるのであれば確かにこちらの方が使いやすいと思いました。
https://demos.jquerymobile.com/1.4.5/popup-iframe/

@rtomitani
Copy link
Contributor Author

@rtomitani 気になったので、 iframe で作るpopup の sample を探しました。
下記のような動作を意図しているのだと思われます。 可能であればiframe版も作っていただけますか?
windowがmodal的に開けるのであれば確かにこちらの方が使いやすいと思いました。
https://demos.jquerymobile.com/1.4.5/popup-iframe/

ご確認ありがとうございます!
Modal Windowというイメージですね。やってみます!

@rtomitani
Copy link
Contributor Author

rtomitani commented Jul 7, 2022

@kozayupapa
PhotoViewがすでにモーダルで、Twitterのモーダルを入れ子にする必要がありますので、少し工夫がいるかもしれません
すでに何個かモーダルがあると思いますが、これをライブラリを使って書き換えるところからスタートしても良いですかね?

@kozayupapa
Copy link
Collaborator

@kozayupapa PhotoViewがすでにモーダルで、Twitterのモーダルを入れ子にする必要がありますので、少し工夫がいるかもしれません すでに何個かモーダルがあると思いますが、これをライブラリを使って書き換えるところからスタートしても良いですかね?

@rtomitani ぜひ! このあたりもっとブラッシュアップできるんだろうなと思っておりました!

@rtomitani
Copy link
Contributor Author

@kozayupapa
iframeでのTweet画面を実装してみたのですが、コネクションが拒否されるので、確認してみたところ、Twitterが許可していないようですね

Web Intents cannot be loaded inside an iframe.
https://developer.twitter.com/en/docs/twitter-for-websites/web-intents/overview

とりあえず最初のコミットのポップアップ形式で良いでしょうか?
汎用的なモーダルのコンポーネントは作り始めているので、そちらは別ブランチでやろうかと思います

@kozayupapa
Copy link
Collaborator

@rtomitani 了解しました 確認、対応ありがとうございます!

@kozayupapa kozayupapa merged commit 56bd763 into main Jul 16, 2022
@kozayupapa kozayupapa deleted the feature-tweet-popup branch July 16, 2022 00:51
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.

2 participants