-
-
Notifications
You must be signed in to change notification settings - Fork 376
Adjusting page_history.js fixed logic to have shorter array of renames #2767
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
Adjusting page_history.js fixed logic to have shorter array of renames #2767
Conversation
WalkthroughThe changes update version-handling functions in Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant CI as createInfo()
participant GH as get_history()
participant GV as get_vdata()
U->>CI: Invoke createInfo(file, newat, altnames, removedat)
CI->>GH: Forward info for version processing
GH->>GV: Request version data (data, v, file, lang)
GV-->>GH: Return link/data based on conditions
GH->>U: Deliver updated file history
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)doc/_static/page_history.js (1)
🪛 Biome (1.9.4)doc/_static/page_history.js[error] 277-277: Use let or const instead of var. A variable declared with var is accessible in the whole body of the function. Thus, the variable can be accessed before its initialization and outside the block where it is declared. (lint/style/noVar) ⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (7)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
doc/_static/page_history.js
(6 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
doc/_static/page_history.js
[error] 281-281: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 283-283: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 277-277: Use let or const instead of var.
A variable declared with var is accessible in the whole body of the function. Thus, the variable can be accessed before its initialization and outside the block where it is declared.
See MDN web docs for more details.
Unsafe fix: Use 'let' instead.
(lint/style/noVar)
[error] 322-322: Template literals are preferred over string concatenation.
Unsafe fix: Use a template literal.
(lint/style/useTemplate)
[error] 322-322: Use let or const instead of var.
A variable declared with var is accessible in the whole body of the function. Thus, the variable can be accessed before its initialization and outside the block where it is declared.
See MDN web docs for more details.
Unsafe fix: Use 'let' instead.
(lint/style/noVar)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: documentation (en)
🔇 Additional comments (5)
doc/_static/page_history.js (5)
1-5
: Function signature and storage improvement for tracking removal datesGood addition of the
removedat
parameter to thecreateInfo
function. This enhancement allows for tracking when files were removed, which aligns with the PR objective of improving the page history logic.
22-22
: Added pgr_degree to newpagesGreat addition of
pgr_degree
to the version 3.4 pages list, which addresses the PR objective of adding the previously missing function.
50-52
: Updated format for spanningTree-categoryGood update to the
spanningTree-category
entry using the new format, which supports the cleaner array structure objective.
317-317
: Improved logic for handling removed pagesGood addition of a check for
removedat
. This optimizes the version links generation by avoiding processing unsupported versions when a page has been removed.
323-323
: Updated get_vdata function callsThe calls to
get_vdata
have been properly updated to pass the additional parameters needed for the enhanced link generation logic.Also applies to: 341-341
Fixes #2765
Changes proposed in this pull request:
@pgRouting/admins
Summary by CodeRabbit
3.4
.