Skip to content

Transitions Tables to a Heading Layout for API Reference#6208

Merged
sarah11918 merged 6 commits intowithastro:mainfrom
SatanshuMishra:pr-6201
Jan 12, 2024
Merged

Transitions Tables to a Heading Layout for API Reference#6208
sarah11918 merged 6 commits intowithastro:mainfrom
SatanshuMishra:pr-6201

Conversation

@SatanshuMishra
Copy link
Copy Markdown
Contributor

Description (required)

This PR replaces the Tables on the API Reference page to use Headings instead. The changes maintain the same heading structure in the side-bar and bring the page to a similar layout to the rest of the page and the configuration reference page. Preview of changes attached below:

Side-by-side preview of changes.

Related issues & labels (optional)

Special thanks to @VoxelMC for his help!

- Changes 2/3 tables to Heading based layout similar to the Configuation reference page.
- Re-formatted tables to heading layout consistent with the rest of the page and configuration reference page.
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Jan 12, 2024 8:10pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs-i18n ⬜️ Ignored (Inspect) Visit Preview Jan 12, 2024 8:10pm

@astrobot-houston
Copy link
Copy Markdown
Contributor

Hello! Thank you for opening your first PR to Astro’s Docs! 🎉

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any broken links you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Netlify 🥳

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@SatanshuMishra
Copy link
Copy Markdown
Contributor Author

There is also another table present further down the page under the The pagination page prop header. Should I also transition that to a similar format? (Screenshot attached)

image

@VoxelMC
Copy link
Copy Markdown
Contributor

VoxelMC commented Jan 9, 2024

Thanks for starting to work on this, @SatanshuMishra! I would suggest making this a Draft PR for now, as it's not quite done yet.

@sarah11918 for the sake of consistency, how do you feel about the way that these properties are documented?
image

I don't think they would work for the properties in Astro.cookies, because of how long the descriptions are. Whatever we come up with for Astro.cookies, should we apply it wherever else properties are documented, such as in Astro.response?

@SatanshuMishra SatanshuMishra marked this pull request as draft January 9, 2024 02:00
@sarah11918
Copy link
Copy Markdown
Member

So to answer the questions so far:

YES DESTROY ALL TABLES. I want no tables remaining. 😄

As to the Astro.response, I'm tempted to leave it as is because it's so visually compact, and I think maybe more helpful when you can see it that way? Looking at the cookies.set option, for example, it feels sooooooo long and drawn out, for mostly short entries, I might prefer to see what this looks like in the bulleted form too.

I'm not sure stretching everything out into headings is visually helpful, even if structurally it makes sense. I'll ask some others to take a look here!

@SatanshuMishra
Copy link
Copy Markdown
Contributor Author

Sounds good! I have a meeting in an hour or so. I will make the changes after :)!

@sarah11918
Copy link
Copy Markdown
Member

Alright, so after some chatting, I say leave Astro.response as is, since in fact we used to just have a link out to a standard response object, but that content was removed so we added it in here to be helpful. (But, it's really not documenting an Astro thing; just saying that we conform to a standard).

As for the tables, let's keep going with the headings. It's the best structure, and so it does make sense to use it. If we need to do visual adjusting from that, we always can later.

- Converted the table found under the `The pagination page prop` to a heading layout. The style is in sync with the rest of the page and previous changes.
@SatanshuMishra
Copy link
Copy Markdown
Contributor Author

The last commit changes the final Table into a heading based layout. The style is consistent with the previous changes made above. Preview of change is attached below:

image

@VoxelMC
Copy link
Copy Markdown
Contributor

VoxelMC commented Jan 9, 2024

So to answer the questions so far:

YES DESTROY ALL TABLES. I want no tables remaining. 😄

As to the Astro.response, I'm tempted to leave it as is because it's so visually compact, and I think maybe more helpful when you can see it that way? Looking at the cookies.set option, for example, it feels sooooooo long and drawn out, for mostly short entries, I might prefer to see what this looks like in the bulleted form too.

I'm not sure stretching everything out into headings is visually helpful, even if structurally it makes sense. I'll ask some others to take a look here!

I definitely agree with this. Just wanted to make sure it aligned well with you and DX's standpoint.
I will now log this in my memory as maintainable formatting - and be on the lookout for inconsistencies as the self-proclaimed Docs Inconsistency Sheriff :)

Also, perhaps another PR is in order later to reword some of the property descriptions. But that's just my opinion

@SatanshuMishra
Copy link
Copy Markdown
Contributor Author

@sarah11918, I've made all the changes you were looking for, and they're now available for you to review together :)

@sarah11918
Copy link
Copy Markdown
Member

Thank you @SatanshuMishra ! We were even talking about asking our designer if he had an opinion to share. I think structurally, this is the best format. Some other docs maintainers and I will review the specific changes to see what we think, but we VERY MUCH appreciate you starting this off and giving us something to look at!

@doodlemarks
Copy link
Copy Markdown
Contributor

@SatanshuMishra chiming in real quick.

I like this format better than the table! My only comment would be that the vertical rhythm needs some help.

image

As of now in the example above taken from the preview link all the spacing between lines is very similar if not identical. Where there are arrows I would shrink the space so each line of each section can show that they are connected. Also, helps with readability.

Let me know if I can provide more guidance!

@VoxelMC
Copy link
Copy Markdown
Contributor

VoxelMC commented Jan 9, 2024

@SatanshuMishra chiming in real quick.

I like this format better than the table! My only comment would be that the vertical rhythm needs some help.

image As of now in the example above taken from the preview link all the spacing between lines is very similar if not identical. Where there are arrows I would shrink the space so each line of each section can show that they are connected. Also, helps with readability.

Let me know if I can provide more guidance!

The space between the type and the body text can probably be removed.

Edit: Nevermind, the top-margin of the <p> tags is what is determining this, at the moment.

@sarah11918
Copy link
Copy Markdown
Member

Thanks to Mark, our designer, for weighing in! We've discussed and decided that the scope of this PR should just be moving to headings... freeing the data from the tables and putting it reasonably out into headings.

Yeah, spacing is a little wide (Chris thinks he found a specific docs issue) and so things aren't visually grouped as well as they could be, but Chris will work separately on that! All we need to do here is liberate the data!

I'll do a closer review of this tomorrow just to make sure, but right now, all we need to worry about is the info structure. We'll tackle styling separately! 🙌

@SatanshuMishra
Copy link
Copy Markdown
Contributor Author

Sounds good! Even though the focus for this PR is content, I am happy to maybe start a thread on discord or some form of discussion (maybe another issue) to start exploring different spacing options and styles with @doodlemarks and @VoxelMC.

Copy link
Copy Markdown
Contributor

@VoxelMC VoxelMC left a comment

Choose a reason for hiding this comment

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

LGTM, but pending my comment :)

- Removed commented from the file. This was replaced by a heading based layout in the previous commit.
Copy link
Copy Markdown
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

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

Thank you for handling this @SatanshuMishra, as well to our amazing reviewers. LGTM ✅

Copy link
Copy Markdown
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you so much for grabbing this issue, responding to feedback, and working collaboratively with us! This is an amazing first-time contribution, and we're so happy to welcome you to Team Docs! 🥳

@sarah11918 sarah11918 added consistency/formatting Standardizing without changing docs content e.g. indenting, lists etc. Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! labels Jan 12, 2024
@sarah11918 sarah11918 merged commit 4abfbe4 into withastro:main Jan 12, 2024
ematipico pushed a commit that referenced this pull request Jan 26, 2024
Co-authored-by: voxel!() <20650404+VoxelMC@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Mark Peck <2244813+doodlemarks@users.noreply.github.com>
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consistency/formatting Standardizing without changing docs content e.g. indenting, lists etc. Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace terrible tables with headings, bullets etc.

6 participants