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

feat: add showNews method #648

Merged
merged 2 commits into from
Dec 18, 2023
Merged

Conversation

stefanoCrmg
Copy link
Contributor

@stefanoCrmg stefanoCrmg commented May 29, 2023

Intercom has recently(?) added the showNews feature and I figured it might be worth it to map it 😄 https://developers.intercom.com/installing-intercom/docs/intercom-javascript#intercomshownews-newsitemid

I would have also added an e2e test for the feature but without having an actual news on the intercom instance it just didn't make much sense.

If you could please create a news on Intercom and provide the newsId I'll gladly write an E2E for it!

@changeset-bot
Copy link

changeset-bot bot commented May 29, 2023

🦋 Changeset detected

Latest commit: 4cbd43a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
react-use-intercom Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@devrnt
Copy link
Owner

devrnt commented May 29, 2023

This is great, big thanks! I've created a news item (33910172) and tested it but at the moment it doesn't work. I think this has to do with the fact that this feature is still in beta

@bel0v
Copy link

bel0v commented Jun 22, 2023

Hi! really looking forward to this feature. I wired it up it with

      window.Intercom.apply(null, ['showNews', id])

for now and it worked. Hoping to see it in react-use-intercom's API!

P.S I had to figure out what the news item id is.

This is not the right one:
Screenshot 2023-06-22 at 14 42 36

The one you're looking for can be found if you click into a news item, and in its url you'll find

https://news.intercom.com/my-awesome-company/news/12345-my-news

where 12345 is the one you want

reverts pnpm version
@stefanoCrmg
Copy link
Contributor Author

stefanoCrmg commented Jun 26, 2023

Yep, unfortunately it looks like I'll need a different ID to make the example work and not just show a white screen 🤔
I reviewed my PR a bit as I had introduced an upgrade to pnpm.lock by error, the CI checks should work fine now.

@devrnt
Copy link
Owner

devrnt commented Jun 26, 2023

Hi! really looking forward to this feature. I wired it up it with

      window.Intercom.apply(null, ['showNews', id])

for now and it worked. Hoping to see it in react-use-intercom's API!

P.S I had to figure out what the news item id is.

This is not the right one: Screenshot 2023-06-22 at 14 42 36

The one you're looking for can be found if you click into a news item, and in its url you'll find

https://news.intercom.com/my-awesome-company/news/12345-my-news

where 12345 is the one you want

This is interesting, thanks. Unfortunately, I can't create a news item for the playground namespace. News is at the moment not part of the Intercom development namespace

@devrnt
Copy link
Owner

devrnt commented Jun 26, 2023

Unfortunately, I can't create a news item for the playground namespace. News is at the moment not part of the Intercom development namespace

Big thanks. Unfortunately, I can't create a news item for the playground namespace. News is at the moment not part of the Intercom development namespace

@stefanoCrmg
Copy link
Contributor Author

@devrnt I've tried countless of time building this project in a docker container running node@18.16.0 just like the github action but I can never get the build to fail.

Do you have any idea on what I should take a look at to get everything to work? I'm a bit lost 🤔

@devrnt
Copy link
Owner

devrnt commented Jul 2, 2023

The pipeline is working again. Still thinking about what to do with the news id in the examples

@devrnt
Copy link
Owner

devrnt commented Dec 18, 2023

Later than expected but I decided to merge this PR even without a working example. I still can't create a news item for the playground/demo namespace

@devrnt
Copy link
Owner

devrnt commented Dec 18, 2023

Big thanks!

@devrnt devrnt merged commit b67fcd9 into devrnt:main Dec 18, 2023
5 checks passed
@devrnt
Copy link
Owner

devrnt commented Dec 18, 2023

5.2.0

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