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

docs: replace redirected or missing links to sdk documentation #2125

Merged
merged 5 commits into from
Dec 14, 2024

Conversation

zimeg
Copy link
Member

@zimeg zimeg commented Dec 14, 2024

Summary

This PR replaces redirected or unexpected links related to tools.slack.dev

Some of these were found with searches for "https://slack.dev" and some were found in outputs from npm run build for docs 📚

Preview

These updates are made to keep the homepages on npmjs.com up to date! On the next releases of these packages I'm hoping this changes 👀

Notes

Requirements

@zimeg zimeg added docs M-T: Documentation work only semver:patch labels Dec 14, 2024
@zimeg zimeg requested review from lukegalbraithrussell and a team December 14, 2024 00:19
@zimeg zimeg self-assigned this Dec 14, 2024
Copy link
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

📝 Notes for the wonderful reviewers!

@@ -3,7 +3,7 @@
The `@slack/rtm-api` package contains a simple, convenient, and configurable client for receiving events and sending simple messages to Slack's [Real Time Messaging API](https://api.slack.com/rtm). Use it in your
app to stay connected to the Slack platform over a persistent Websocket connection.

**Note**: RTM isn't available for modern scoped apps anymore. We recommend using the [Events API](https://slack.dev/node-slack-sdk/events-api) and [Web API](https://slack.dev/node-slack-sdk/web-api) instead. If you need to use RTM (possibly due to corporate firewall limitations), you can do so by creating a [legacy scoped app](https://api.slack.com/apps?new_classic_app=1). If you have an existing RTM app, do not update its scopes as it will be updated to a modern scoped app and stop working with RTM.
**Note**: The RTM API isn't available for modern granular-permissions apps, and you can no longer create new legacy apps. We recommend using [Bolt for JavaScript](https://tools.slack.dev/bolt-js). If you have an existing RTM app, do not update its scopes as it will be updated to a granular-permissions app and stop working with the RTM API.
Copy link
Member Author

Choose a reason for hiding this comment

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

This matches the wording on tools.slack.dev itself!

https://tools.slack.dev/node-slack-sdk/rtm-api

Comment on lines 250 to 252
</details>

---
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixes possible confusion in markdown parsing - this might've been interpreted as a header called ""!

@@ -170,7 +170,7 @@ app.get('/slack/oauth_redirect', (req, res) => {

There are many situations where you may want to persist some custom data relevant to your application across the entire OAuth flow. For example, you may want to map Slack resources (like users) to your own application's resources, or verify and gate eligibility for proceeding with installing your Slack application to a workspace based on your application's requirements. To this end, this package provides a series of hooks, or callbacks, that allow your application to integrate throughout key points of the OAuth flow.

These are all callbacks customizable via the [`CallbackOptions`](reference/oauth#callbackoptions) and [`InstallPathOptions`](reference/oauth#installpathoptions) interfaces - check their [reference documentation](reference/oauth) for more details.
These are all callbacks customizable via the [`CallbackOptions`](/reference/oauth/interfaces/CallbackOptions) and [`InstallPathOptions`](/reference/oauth/interfaces/InstallPathOptions) interfaces - check their [reference documentation](reference/oauth) for more details.
Copy link
Member Author

Choose a reason for hiding this comment

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

Absolute linking off from the baseUrl here to avoid ambiguous links to these pages:
https://tools.slack.dev/node-slack-sdk/reference/oauth/interfaces/CallbackOptions

Copy link
Contributor

@lukegalbraithrussell lukegalbraithrussell left a comment

Choose a reason for hiding this comment

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

godspeed!

(also this is def a good cleanup but for my own honor, i made sure the slack.dev site has rules to redirect slack.dev/any-sdk/* to tools.slack.dev/any-sdk/*! They should be redirecting)

Copy link
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

@lukegalbraithrussell Please know I never meant to imply these redirect weren't excellent! Just hoping to avoid extra redirects wherever posisble 📚 🔍

I found a few repetitive https://tools.slack.dev/node-slack-sdk links included just now but these were updated. I left a note on a changed needed for this that I'm not soooo confident about. This seems to break the existing link for what might be expected!

I'll hold off on merging this right now, but would love to know if that change is safe 😬

permalink: /webhook
slug: /webhook
Copy link
Member Author

Choose a reason for hiding this comment

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

This changes the webhook documentation from the first to second:

  1. https://tools.slack.dev/node-slack-sdk/packages/webhook
  2. https://tools.slack.dev/node-slack-sdk/webhook

Which matches the path of other packages - the others don't include "packages" in the path!

Copy link
Contributor

Choose a reason for hiding this comment

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

oh good catch -- you are indeed correct! permalink is what the old jekyll site used, i missed it

Copy link
Member Author

Choose a reason for hiding this comment

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

Super interesting moves by jekyll, thanks for making this clear!! 🙏

Copy link
Contributor

Choose a reason for hiding this comment

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

oh yes to wrap up explanation -- permalink is ignored entirely. when there's nothing set, docusaurus defaults to the folder structure the md file is in

Comment on lines -6 to -12
# Slack Incoming Webhooks

[![build-ci](https://github.com/slackapi/node-slack-sdk/actions/workflows/ci-build.yml/badge.svg)](https://github.com/slackapi/node-slack-sdk/actions/workflows/ci-build.yml)
<!-- TODO: per-flag badge https://docs.codecov.io/docs/flags#section-flag-badges-and-graphs -->
[![codecov](https://codecov.io/gh/slackapi/node-slack-sdk/branch/main/graph/badge.svg)](https://codecov.io/gh/slackapi/node-slack-sdk)
<!-- TODO: npm versions with scoped packages: https://github.com/rvagg/nodei.co/issues/24 -->

Copy link
Member Author

Choose a reason for hiding this comment

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

🪓 Might've been carried over from the GitHub README.md but let me know if I should revert!

@@ -13,10 +13,10 @@ The Node Slack SDK has corresponding packages for Slack APIs. They are small and

| Slack API | Use | NPM package |
|--------------|--------------|-------------------|
| Web API | Send data to or query data from Slack using any of [over 200 methods](https://api.slack.com/methods). | [`@slack/web-api`](https://tools.slack.dev/node-slack-sdk/web-api) |
| OAuth | Set up the authentication flow using V2 OAuth for Slack apps as well as V1 OAuth for classic Slack apps. | [`@slack/oauth`](https://tools.slack.dev/node-slack-sdk/oauth) |
| Incoming Webhooks | Send notifications to a single channel which the user picks on installation. | [`@slack/webhook`](https://tools.slack.dev/node-slack-sdk/webhook) |
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the link fixed by the change from permalink to slug below! 👾

Copy link
Contributor

@lukegalbraithrussell lukegalbraithrussell left a comment

Choose a reason for hiding this comment

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

:shipit:

@zimeg
Copy link
Member Author

zimeg commented Dec 14, 2024

@lukegalbraithrussell And with worries quelled, I think it's an alright time to merge this 🫡

@zimeg zimeg merged commit 306b0aa into main Dec 14, 2024
57 checks passed
@zimeg zimeg deleted the zimeg-docs-tools-homepage branch December 14, 2024 02:32
Copy link

codecov bot commented Dec 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.89%. Comparing base (637fca2) to head (69f9cfc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2125   +/-   ##
=======================================
  Coverage   91.89%   91.89%           
=======================================
  Files          38       38           
  Lines       10320    10320           
  Branches      649      649           
=======================================
  Hits         9484     9484           
  Misses        824      824           
  Partials       12       12           
Flag Coverage Δ
cli-hooks 95.24% <ø> (ø)
cli-test 94.48% <ø> (ø)
oauth 77.39% <ø> (ø)
socket-mode 61.82% <ø> (ø)
web-api 96.88% <100.00%> (ø)
webhook 96.65% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs M-T: Documentation work only semver:patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants