Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update links in the documentation #5175

Merged
merged 12 commits into from
Aug 15, 2024
Merged

Update links in the documentation #5175

merged 12 commits into from
Aug 15, 2024

Conversation

rzadp
Copy link
Contributor

@rzadp rzadp commented Jul 29, 2024

  • Where applicable, use a regular [reference] instead of ../../../reference/index.html.
  • Typos.
  • Update a link to polkadot-evm which has moved out of the monorepo.
  • The link specification for chain_spec_builder is invalid (actually it was valid) - it works fine without it.

Part of paritytech/eng-automation#10

rzadp added 6 commits July 29, 2024 16:12
@rzadp rzadp added R0-silent Changes should not be mentioned in any release notes T11-documentation This PR/Issue is related to documentation. labels Jul 29, 2024
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable 1/3
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6843719

//! > [`source`](./mod.rs.html) button at the top right of the page.
//! > `source` button at the top right of the page.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This link didn't work.
It is however possible to make it work - it would look like this:

[`source`](../../../src/polkadot_sdk_docs/guides/your_first_pallet/mod.rs.html)

(Unless I'm missing some other obvious way of linking to source)
I thought it's better to not have a link, since the user is pointed to the built-in button anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am surprised, why didn't the original one, or sth like ../mod.rs work? I don't see why we have to back up 3 steps and re-navigate ourselves into the same directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

back up 3 steps and re-navigate ourselves into the same directory

Not the same directory.

It navigates from:
target/doc/polkadot_sdk_docs/guides/your_first_pallet/index.html
to:
target/doc/src/polkadot_sdk_docs/guides/your_first_pallet/mod.rs.html

(note added src)

So it will link from here to here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, we can remove the link for now.

As a wishlist item, I wish we could amend each page to have a few fixed buttons/links in a more pronounced way:

  • how to contribute to this page
  • how to see the source of this page

The latter is already visible via the default rust HTML indeed.

@@ -319,11 +319,11 @@
//! - Learn more about the individual pallet items/macros, such as event and errors and call, in
//! [`frame::pallet_macros`].
//!
//! [`pallet::storage`]: ../../../frame_support/pallet_macros/attr.config.html
//! [`pallet::storage`]: ../../../frame_support/pallet_macros/attr.storage.html
//! [`pallet::call`]: ../../../frame_support/pallet_macros/attr.call.html
//! [`pallet::event`]: ../../../frame_support/pallet_macros/attr.event.html
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In here, I think the proper way would be to link to frame_support::pallet_macros::event, instead of using ../../../.

However the link then resolves a little differently (straight to frame-support-procedural) instead of frame-support, so in this case ../../../ type of linking is preferable.

Copy link
Contributor

Choose a reason for hiding this comment

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

This should be fixed with #5023, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That PR is merged and I have it included in my branch, but it doesn't work for me, unless I'm doing something wrong.

This (ugly) link to ../../../frame_support/pallet_macros/attr.config.html has the documentation.

The (nice) link to frame_support::pallet_macros::config somehow navigates to frame_support_procedural/attr.config.html and doesn't have docs:

Screenshot 2024-07-30 at 13 20 22

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, so to recap, with the PR above, frame_support_procedural is the right place for the docs, but in that PR @gupnik didn't move all of them, and instead resided to a follow-up, but he is on holidays now :)

TLDR:

  1. if you jump to frame_support_procedural, that's fine
  2. in the meantime, you can try and follow in nikhil's footsptes and perhaps move a few more macros over? :) up to you

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, understood.

So I switched to the proper links which jump to frame_support_procedural, which eventually will contain the docs.

I'll see if I can help with 2. (separately - so the PR is ready for review).

@rzadp rzadp requested a review from kianenigma July 29, 2024 14:27
@rzadp rzadp requested a review from ggwpez August 5, 2024 13:12
@rzadp rzadp requested a review from mordamax August 9, 2024 11:17
@ggwpez ggwpez enabled auto-merge August 9, 2024 19:11
@ggwpez ggwpez disabled auto-merge August 9, 2024 19:12
@ggwpez
Copy link
Member

ggwpez commented Aug 9, 2024

Marking this as R0-silent will not trigger a release of the crate and only include it in the next stable release.

@rzadp
Copy link
Contributor Author

rzadp commented Aug 12, 2024

Marking this as R0-silent will not trigger a release of the crate and only include it in the next stable release.

Hmm, I see that the crate is marked with publish = false and seems to stay on 0.0.1:

# This crate is not publish-able to crates.io for now because of docify.
publish = false
version = "0.0.1"

So it seems to me like it's released a bit differently, do we still should treat it with a prdoc?

@rzadp
Copy link
Contributor Author

rzadp commented Aug 12, 2024

Note: I updated the favicon link which went missing with the new website release.

@rzadp rzadp added this pull request to the merge queue Aug 15, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 15, 2024
@bkchr bkchr added this pull request to the merge queue Aug 15, 2024
Merged via the queue into master with commit b5029eb Aug 15, 2024
170 of 172 checks passed
@bkchr bkchr deleted the rzadp/docs-links branch August 15, 2024 15:28
ordian added a commit that referenced this pull request Aug 16, 2024
* master:
  Remove redundant minimal template workspace (#5330)
  approval-distribution: Fix handling of conclude (#5375)
  More logs in `is_potential_spam` from `dispute-coordinator` (#5252)
  Fix zombienet bridges test (#5373)
  Update Readme of the `polkadot` crate (#5326)
  allow for `u8` to be used as hold/freeze reason (#5348)
  Moving cargo check for runtimes to GHA (#5340)
  Update links in the documentation (#5175)
  fix visibility for `pallet_nfts` types used as call arguments (#3634)
  Correct some typos in crates' descriptions (#5262)
  Aura: Ensure we are building on each relay chain fork (#5352)
  Update Identity pallet README.md (#5183)
  Bump trie-db from 0.29.0 to 0.29.1 (#5231)
  [Coretime] Always include UnpaidExecution, not just when revenue is > 0 (#5369)
  [Pools] fix derivation of pool account (#4999)
ordian added a commit that referenced this pull request Aug 16, 2024
* master:
  Remove redundant minimal template workspace (#5330)
  approval-distribution: Fix handling of conclude (#5375)
  More logs in `is_potential_spam` from `dispute-coordinator` (#5252)
  Fix zombienet bridges test (#5373)
  Update Readme of the `polkadot` crate (#5326)
  allow for `u8` to be used as hold/freeze reason (#5348)
  Moving cargo check for runtimes to GHA (#5340)
  Update links in the documentation (#5175)
  fix visibility for `pallet_nfts` types used as call arguments (#3634)
  Correct some typos in crates' descriptions (#5262)
  Aura: Ensure we are building on each relay chain fork (#5352)
  Update Identity pallet README.md (#5183)
  Bump trie-db from 0.29.0 to 0.29.1 (#5231)
  [Coretime] Always include UnpaidExecution, not just when revenue is > 0 (#5369)
  [Pools] fix derivation of pool account (#4999)
  Upgrade accidentally downgraded deps (#5365)
  [Pools] Fix issues with member migration to `DelegateStake` (#4822)
  Unify `no_genesis` check (#5360)
  [CI] Fix prdoc command (#5358)
  Beefy: add benchmarks for `report_fork_voting()` (#5188)
ordian added a commit that referenced this pull request Aug 16, 2024
…ct-candidate-weight

* ao-fix-parainclusion-weight-overestimation:
  Remove redundant minimal template workspace (#5330)
  approval-distribution: Fix handling of conclude (#5375)
  More logs in `is_potential_spam` from `dispute-coordinator` (#5252)
  Fix zombienet bridges test (#5373)
  Update Readme of the `polkadot` crate (#5326)
  allow for `u8` to be used as hold/freeze reason (#5348)
  Moving cargo check for runtimes to GHA (#5340)
  Update links in the documentation (#5175)
  fix visibility for `pallet_nfts` types used as call arguments (#3634)
  Correct some typos in crates' descriptions (#5262)
  Aura: Ensure we are building on each relay chain fork (#5352)
  Update Identity pallet README.md (#5183)
  Bump trie-db from 0.29.0 to 0.29.1 (#5231)
  [Coretime] Always include UnpaidExecution, not just when revenue is > 0 (#5369)
  [Pools] fix derivation of pool account (#4999)
  Upgrade accidentally downgraded deps (#5365)
  [Pools] Fix issues with member migration to `DelegateStake` (#4822)
  Unify `no_genesis` check (#5360)
  [CI] Fix prdoc command (#5358)
  Beefy: add benchmarks for `report_fork_voting()` (#5188)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
R0-silent Changes should not be mentioned in any release notes T11-documentation This PR/Issue is related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants