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

Add line numbers to docs #1797

Merged

Conversation

WilliamBergamin
Copy link
Contributor

Summary

This PR introduces line numbers in code block (this is present in the bolt-python docs)

BEFORE
Screenshot 2023-04-04 at 3 19 01 PM

AFTER
Screenshot 2023-04-04 at 3 20 35 PM

I like the line numbers, let me know what you think, this PR is subjective

Also adds a markdown linter config file

Requirements

@WilliamBergamin WilliamBergamin added the docs M-T: Documentation work only label Apr 4, 2023
@WilliamBergamin WilliamBergamin self-assigned this Apr 4, 2023
@codecov
Copy link

codecov bot commented Apr 4, 2023

Codecov Report

Merging #1797 (fe9fee9) into main (32d34c4) will not change coverage.
The diff coverage is n/a.

❗ Current head fe9fee9 differs from pull request most recent head d1469ed. Consider uploading reports for the commit d1469ed to get more accurate results

@@           Coverage Diff           @@
##             main    #1797   +/-   ##
=======================================
  Coverage   82.27%   82.27%           
=======================================
  Files          18       18           
  Lines        1523     1523           
  Branches      441      441           
=======================================
  Hits         1253     1253           
  Misses        172      172           
  Partials       98       98           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@misscoded misscoded left a comment

Choose a reason for hiding this comment

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

I love the look of it, but how does it behave with regard to copy/pasting? Are the numbers carried over? If so, that'd be a no-go for me. I'd also raise this in channel just to ensure there are no unintended consequences as a result.

Barring those two things, LGTM!

@WilliamBergamin
Copy link
Contributor Author

The numbers do not carry over 💯

Screenshot 2023-04-04 at 5 17 56 PM

Copied content

// Handle a view_submission request
app.view('view_b', async ({ ack, body, view, client, logger }) => {
  // Acknowledge the view_submission request
  await ack();

  // Do whatever you want with the input data - here we're saving it to a DB then sending the user a verification of their submission

  // Assume there's an input block with `block_1` as the block_id and `input_a`
  const val = view['state']['values']['block_1']['input_a'];
  const user = body['user']['id'];

  // Message to send user
  let msg = '';
  // Save to DB
  const results = await db.set(user.input, val);

  if (results) {
    // DB save was successful
    msg = 'Your submission was successful';
  } else {
    msg = 'There was an er

@WilliamBergamin
Copy link
Contributor Author

I'd also raise this in channel just to ensure there are no unintended consequences as a result.

@misscoded from my post in channel seems like we have the 👍 for this PR

@WilliamBergamin WilliamBergamin merged commit 0f90200 into slackapi:main Apr 5, 2023
@WilliamBergamin WilliamBergamin deleted the add-line-numbers-to-doc branch April 5, 2023 17:52
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants