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

V3 maintenance] consolidate and document core changes in v3 #397

Conversation

ReneWerner87
Copy link
Member

@ReneWerner87 ReneWerner87 commented Apr 16, 2024

Summary by CodeRabbit

  • Documentation
    • Restructured API documentation for better organization and readability.
    • Updated method names and documentation in API guides.
    • Enhanced flexibility and functionality of the Fiber package for building web applications in Go.
    • Updated code snippet language for clarity in introductory guide.
    • Enhanced routing guide with better-organized content and examples.
    • Modified sidebar entries to reflect new documentation structure.

Copy link

coderabbitai bot commented Apr 16, 2024

Walkthrough

The update significantly restructures and enhances the Fiber documentation across various files, improving clarity and organization. It introduces new sections, updates method names, and aligns content with recent changes in the Fiber v3 release, ensuring users have the latest information for effective application development.

Changes

Files Change Summary
docs/core/api/app.md, docs/core/api/fiber.md Restructured content with categorized sections for better clarity, focusing on specific aspects of the Fiber application. Additionally, enhancements to the New method, server configurations, and introduction of helper functions like IsChild.
docs/core/api/ctx.md Updated method names, removed outdated methods, and aligned references from *fiber.Ctx to fiber.Ctx interface to reflect changes in Fiber v3.
docs/core/extra/_category_.json Updated description field within the JSON file for extra contents related to Fiber.
docs/core/guide/routing.md Restructured content related to examples and custom constraints for improved organization and clarity in the routing guide.
docs/core/intro.md Updated code snippet language from text to bash for the command go run server.go.
sidebars.js Added a new document entry for 'whats_new' and removed the label '👋 Welcome' in the tutorialSidebar section.

Possibly related issues

Poem

🐇 Oh hoppy day, the docs are neat,
📄 With every change, a treat to greet.
🌟 From app to ctx, we've made things clear,
🚀 Fiber v3, the future's here!
📚 Read, explore, and then create,
🎉 For Fiber's docs are truly great!


Recent Review Details

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between ba83c1b and b847cea.
Files selected for processing (1)
  • docs/core/whats_new.md (1 hunks)
Additional comments not posted (2)
docs/core/whats_new.md (2)

23-24: Ensure that headings are surrounded by blank lines for proper markdown formatting.


29-29: Remove trailing spaces to adhere to markdown best practices.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ReneWerner87
Copy link
Member Author

is only the first wave of changes, which will come later via gofiber/fiber#2934

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 14

Actionable comments outside the diff hunks (1)
docs/core/api/app.md (1)

Line range hint 52-52: Add a space between sentences to improve readability in the documentation.

- specific settings.  `...
+ specific settings. `...

Comment on lines +15 to +16
### Drop for old Go versions
### App changes
Copy link

Choose a reason for hiding this comment

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

Ensure that headings are surrounded by blank lines for proper markdown formatting.

+ 

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
### Drop for old Go versions
### App changes
### Drop for old Go versions
### App changes

Comment on lines +20 to +21
### Context change
#### interface
Copy link

Choose a reason for hiding this comment

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

Ensure that headings are surrounded by blank lines for proper markdown formatting.

+ 

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
### Context change
#### interface
### Context change
#### interface

- Listen functions reduced

### Context change
#### interface
Copy link

Choose a reason for hiding this comment

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

Remove trailing spaces to adhere to markdown best practices.

-#### interface 
+#### interface

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
#### interface
#### interface

This method creates a new **App** named instance. You can pass optional [config ](#config)when creating a new instance.
### New

This method creates a new **App** named instance. You can pass optional [config](#config)when creating a new instance.
Copy link

Choose a reason for hiding this comment

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

Ensure there is a space between "config" and "when" in the sentence.

- You can pass optional [config](#config)when creating a new instance.
+ You can pass optional [config](#config) when creating a new instance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
This method creates a new **App** named instance. You can pass optional [config](#config)when creating a new instance.
This method creates a new **App** named instance. You can pass optional [config](#config) when creating a new instance.

| CaseSensitive | `bool` | When enabled, `/Foo` and `/foo` are different routes. When disabled, `/Foo`and `/foo` are treated the same. | `false` |
| Property | Type | Description | Default |
|------------------------------|-------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
| AppName | `string` | This allows to setup app name for the app | `""` |
Copy link

Choose a reason for hiding this comment

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

Correct the usage of "setup" to "set up" as it should be two words when used as a verb.

- This allows to setup app name for the app
+ This allows to set up app name for the app

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
| AppName | `string` | This allows to setup app name for the app | `""` |
| AppName | `string` | This allows to set up app name for the app | `""` |

import RoutingHandler from './../partials/routing/handler.md';

## Static
### Static

Use the **Static** method to serve static files such as **images**, **CSS,** and **JavaScript**.
Copy link

Choose a reason for hiding this comment

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

Add a space after the comma in "images, CSS, and JavaScript" to maintain consistency in punctuation.

- images, **CSS,** and **JavaScript**.
+ images, **CSS**, and **JavaScript**.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
Use the **Static** method to serve static files such as **images**, **CSS,** and **JavaScript**.
Use the **Static** method to serve static files such as **images**, **CSS**, and **JavaScript**.

| WriteTimeout | `time.Duration` | The maximum duration before timing out writes of the response. The default timeout is unlimited. | `nil` |
| XMLEncoder | `utils.XMLMarshal` | Allowing for flexibility in using another XML library for encoding. | `xml.Marshal` |


Copy link

Choose a reason for hiding this comment

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

Remove extra blank lines to maintain consistency in document formatting.

- 
-

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change

| OnShutdownSuccess | `func()` | Allows to customize success behavior when gracefully shutting down the server by given signal. | `nil` |
| TLSConfigFunc | `func(tlsConfig *tls.Config)` | Allows customizing `tls.Config` as you want. | `nil` |


Copy link

Choose a reason for hiding this comment

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

Remove extra blank lines to maintain consistency in document formatting.

- 
-

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change

@@ -109,11 +111,11 @@
})
```

## Route Handlers
### Route Handlers
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The review comment is correct in highlighting the need to ensure that the content linked through <RoutingHandler /> is up-to-date and relevant. However, the file docs/partials/routing/handler.md referenced in the documentation does not exist. This issue affects multiple documents within the repository, including docs/core/api/app.md and docs/core/guide/routing.md. It is recommended to check if the file has been moved or renamed and update the references accordingly, or restore the file if it was removed unintentionally.

Analysis chain

The "Route Handlers" section is introduced well with a clear heading. Ensure that the content linked through <RoutingHandler /> is up-to-date and relevant to the context of this section.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the content in 'RoutingHandler' is relevant and up-to-date
cat docs/partials/routing/handler.md

Length of output: 103



Script:

#!/bin/bash
# Search for any markdown files that might contain the content intended for `RoutingHandler` or similar documentation related to routing handlers.
fd '\.md$' docs/ --exec grep -H 'RoutingHandler' {}

Length of output: 313

func (app *App) ShutdownWithContext(ctx context.Context) error
```


Copy link

Choose a reason for hiding this comment

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

Remove extra blank lines to maintain consistency in document formatting.

- 
-

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3


:::caution

Its a draft, not finished yet.
Copy link

Choose a reason for hiding this comment

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

Correct the contraction in the caution note.

- Its a draft, not finished yet.
+ It's a draft, not finished yet.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
Its a draft, not finished yet.
It's a draft, not finished yet.


We are excited to announce the release of Fiber v3! 🚀

Fiber v3 is a major release with a lot of new features, improvements, and breaking changes. We have worked hard to make Fiber even faster, more flexible, and easier to use.
Copy link

Choose a reason for hiding this comment

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

Consider rephrasing to avoid wordiness.

- Fiber v3 is a major release with a lot of new features, improvements, and breaking changes.
+ Fiber v3 is a major release packed with new features, improvements, and significant changes.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
Fiber v3 is a major release with a lot of new features, improvements, and breaking changes. We have worked hard to make Fiber even faster, more flexible, and easier to use.
Fiber v3 is a major release packed with new features, improvements, and significant changes. We have worked hard to make Fiber even faster, more flexible, and easier to use.

### Generic functions
### Middleware refactoring
#### Session middleware
#### Filesystem middleware
Copy link

Choose a reason for hiding this comment

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

Possible spelling mistake found.

- #### Filesystem middleware
+ #### File System Middleware

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
#### Filesystem middleware
#### File System Middleware

@ReneWerner87 ReneWerner87 merged commit 4265993 into master Apr 16, 2024
2 checks passed
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.

1 participant