Skip to content

docs: add user guide - #26

Merged
Athemis merged 4 commits into
mainfrom
docs/user-guide
Dec 10, 2025
Merged

docs: add user guide#26
Athemis merged 4 commits into
mainfrom
docs/user-guide

Conversation

@Athemis

@Athemis Athemis commented Dec 10, 2025

Copy link
Copy Markdown
Owner

Summary

  • Improve documentation by adding a user guide
  • Describe installation and building from source
  • Describe how to use the software

Testing

  • cargo fmt
  • cargo clippy --all-targets --all-features
  • cargo test
  • cargo doc --no-deps

Platforms exercised (mark all that apply):

  • Windows
  • macOS
  • Linux

Screenshots (if UI changes)

Manual test steps (if UI or IO)

Docs/metadata

  • README/CONTRIBUTING updated if behavior or commands changed
  • User Guide updated (if user-facing change)

Notes for reviewers

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive user guide covering installation, features, and workflows for creating and managing ELN archives, including the markdown editor, attachments, keywords, metadata, date/time settings, and archive export.
  • Chores
    • Added build/site output to ignore list and set up automated site build & deployment to GitHub Pages.

✏️ Tip: You can customize this high-level summary in your review settings.

@Athemis Athemis self-assigned this Dec 10, 2025
@Athemis Athemis added the documentation Improvements or additions to documentation label Dec 10, 2025
@coderabbitai

coderabbitai Bot commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Make it so: this change adds an mdBook-based user guide (configuration, content pages, SUMMARY) plus a GitHub Actions workflow and .gitignore entry to build and deploy the generated book.

Changes

Cohort / File(s) Summary
mdBook config & ignore
\.gitignore, docs/user-guide/book.toml
Add mdBook build output ignore and create book configuration with metadata and HTML theme settings.
Book structure
docs/user-guide/src/SUMMARY.md
Introduce SUMMARY.md to define the book's table of contents and section hierarchy.
Introduction & installation
docs/user-guide/src/introduction.md, docs/user-guide/src/installation.md
Add project introduction and cross-platform installation/build-from-source instructions with platform-specific notes and known issues.
Feature docs
docs/user-guide/src/overview.md, docs/user-guide/src/quickstart.md, docs/user-guide/src/markdown.md, docs/user-guide/src/attachments.md, docs/user-guide/src/keywords.md, docs/user-guide/src/metadata.md, docs/user-guide/src/datetime.md, docs/user-guide/src/saving.md
Add detailed pages covering UI overview, quick workflow, markdown editor, attachments (including hashing/metadata), keywords, metadata fields, date/time picker, and saving ELN archives.
CI: deploy mdBook
.github/workflows/mdbook.yml
Add GitHub Actions workflow to build the mdBook site and deploy to GitHub Pages, with artifact upload and deployment steps.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review focus:
    • .github/workflows/mdbook.yml — ensure secrets, permissions, and deployment steps are correct.
    • docs/user-guide/src/installation.md — verify platform-specific commands and prerequisites.
    • docs/user-guide/src/SUMMARY.md and book.toml — validate TOC structure and config keys.
    • Image references and links across docs for accuracy.

Poem

Make it so: a handbook forged in light,
Pages gather knowledge, bold and bright,
From install steps to metadata's song,
The user's path grows clear and strong,
Set course, archive well — the docs delight.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: add user guide' is concise and directly describes the main changeset—adding comprehensive user documentation including installation, usage guides, and configuration files.
Description check ✅ Passed The description follows the template structure with Summary, Testing, Platforms, and Docs/metadata sections. All testing checkboxes are properly marked, and the User Guide update is appropriately flagged.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/user-guide

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
docs/user-guide/src/saving.md (1)

7-9: Excellent workflow documentation; minor style refinement suggested. The saving guide is clear and practical, with a helpful tip that addresses common issues preventing archive saving. The constraint checklist is comprehensive.

Consider the static analysis suggestion to use "brief" instead of "short" in line 8—it strengthens the wording and is more precise for documentation contexts.

docs/user-guide/src/overview.md (1)

7-14: Excellent UI overview that serves as a perfect entry point to the documentation suite. The enumerated sections provide a logical tour through the interface, and the internal links are well-integrated, guiding readers to detailed documentation for each feature. Your descriptions are clear and user-centric.

One style refinement from static analysis: line 13 suggests using a hyphen for the compound adjective "eLabFTW-compatible" to strengthen technical writing conventions. Additionally, please verify the image exists at docs/user-guide/src/images/ui-overview.webp.

docs/user-guide/src/introduction.md (1)

20-27: Refine the Windows support warning for clarity and conciseness.

The phrase "Supporting very old and current operating systems" is somewhat redundant. Consider stronger phrasing: "Supporting obsolete and current operating systems at the same time is difficult..." This maintains the emphasis on the compatibility challenge without relying on the weak intensifier "very."

Apply this diff to strengthen the language:

-> Windows XP and earlier are **not supported**. Supporting very old and current
+> Windows XP and earlier are **not supported**. Supporting obsolete and current
docs/user-guide/src/installation.md (1)

76-79: Polish cross-compilation documentation for clarity and conciseness.

Two improvements are suggested: (1) "cross compilation" should be hyphenated as a compound modifier ("cross-compilation"), and (2) "are not compatible" is wordier than necessary—"incompatible" is more direct.

Apply this diff to refine the language:

- Unfortunately, the `*-win7-windows-gnu` targets which in theory would allow cross compilation and are not dependent on the MSVC BuildTools, produce binaries that are not compatible with Windows 7 due to the lack of certain system libraries.
+ Unfortunately, the `*-win7-windows-gnu` targets which in theory would allow cross-compilation and are not dependent on the MSVC BuildTools, produce binaries that are incompatible with Windows 7 due to the lack of certain system libraries.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2aae63b and eac474c.

📒 Files selected for processing (13)
  • .gitignore (1 hunks)
  • docs/user-guide/book.toml (1 hunks)
  • docs/user-guide/src/SUMMARY.md (1 hunks)
  • docs/user-guide/src/attachments.md (1 hunks)
  • docs/user-guide/src/datetime.md (1 hunks)
  • docs/user-guide/src/installation.md (1 hunks)
  • docs/user-guide/src/introduction.md (1 hunks)
  • docs/user-guide/src/keywords.md (1 hunks)
  • docs/user-guide/src/markdown.md (1 hunks)
  • docs/user-guide/src/metadata.md (1 hunks)
  • docs/user-guide/src/overview.md (1 hunks)
  • docs/user-guide/src/quickstart.md (1 hunks)
  • docs/user-guide/src/saving.md (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-12-03T16:16:45.376Z
Learnt from: CR
Repo: Athemis/ELNPack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-03T16:16:45.376Z
Learning: Applies to src/ui/components/markdown.rs : `src/ui/components/markdown.rs` implements markdown editor with toolbar, cursor-aware insertions, and text area.

Applied to files:

  • docs/user-guide/src/markdown.md
  • docs/user-guide/src/SUMMARY.md
📚 Learning: 2025-12-03T16:16:45.376Z
Learnt from: CR
Repo: Athemis/ELNPack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-03T16:16:45.376Z
Learning: Applies to src/ui/components/keywords.rs : `src/ui/components/keywords.rs` implements keywords editor with inline edits and add-keywords modal.

Applied to files:

  • docs/user-guide/src/keywords.md
📚 Learning: 2025-12-03T16:16:45.376Z
Learnt from: CR
Repo: Athemis/ELNPack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-03T16:16:45.376Z
Learning: Applies to src/logic/eln.rs : `src/logic/eln.rs` builds and writes ELN RO-Crate metadata, generates suggested archive names, and conforms to RO-Crate 1.2 and ELN File Format specification; uses pre-sanitized names from attachments; has no UI dependencies.

Applied to files:

  • docs/user-guide/src/quickstart.md
  • docs/user-guide/src/installation.md
  • docs/user-guide/src/introduction.md
📚 Learning: 2025-12-03T16:16:45.376Z
Learnt from: CR
Repo: Athemis/ELNPack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-03T16:16:45.376Z
Learning: Use `cargo run` to build and launch the desktop app; use `cargo check` before pushing; use `cargo fmt` to format Rust sources (enforced style); use `cargo clippy --all-targets --all-features` to lint for warnings; use `cargo test` to run tests; use `cargo build --release` for optimized binary distribution.

Applied to files:

  • docs/user-guide/src/installation.md
📚 Learning: 2025-12-03T16:16:45.376Z
Learnt from: CR
Repo: Athemis/ELNPack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-03T16:16:45.376Z
Learning: Applies to src/logic/eln.rs : For archive structure and metadata, align with ELN File Format specification: https://raw.githubusercontent.com/TheELNConsortium/TheELNFileFormat/refs/heads/master/SPECIFICATION.md

Applied to files:

  • docs/user-guide/src/introduction.md
📚 Learning: 2025-12-03T16:16:45.376Z
Learnt from: CR
Repo: Athemis/ELNPack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-03T16:16:45.376Z
Learning: Applies to src/ui/components/attachments.rs : `src/ui/components/attachments.rs` implements attachments panel with list, thumbnails, inline filename editing; computes `sanitized_name` using `sanitize_component`; shows WARNING icon on sanitized mismatch; emits commands for file picking/hashing/thumbnails; sanitizes and dedupes edited names.

Applied to files:

  • docs/user-guide/src/attachments.md
🪛 LanguageTool
docs/user-guide/src/installation.md

[grammar] ~78-~78: Use a hyphen to join words.
Context: ...argets which in theory would allow cross compilation and are not dependent on the...

(QB_NEW_EN_HYPHEN)


[style] ~78-~78: Consider using “incompatible” to avoid wordiness.
Context: ...C BuildTools, produce binaries that are not compatible with Windows 7 due to the lack of certa...

(NOT_ABLE_PREMIUM)

docs/user-guide/src/overview.md

[grammar] ~13-~13: Use a hyphen to join words.
Context: ...rom scratch. Will be exported as eLabFTW compatible extra fields in the final ELN...

(QB_NEW_EN_HYPHEN)

docs/user-guide/src/introduction.md

[style] ~22-~22: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...rlier are not supported. Supporting very old and current > operating systems at the ...

(EN_WEAK_ADJECTIVE)

docs/user-guide/src/saving.md

[style] ~8-~8: Consider using the synonym “brief” (= concise, using a few words, not lasting long) to strengthen your wording.
Context: ...tered a title, date/time and at least a short description. Also make sure all attachm...

(QUICK_BRIEF)

🪛 markdownlint-cli2 (0.18.1)
docs/user-guide/src/markdown.md

25-25: Blank line inside blockquote

(MD028, no-blanks-blockquote)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (rust)
🔇 Additional comments (8)
.gitignore (1)

29-30: Excellent addition to the ignore patterns. The mdBook build output path is appropriately positioned and follows the existing conventions for excluding generated artifacts.

docs/user-guide/src/keywords.md (1)

1-12: Well-structured keywords documentation. The content is clear and actionable, the tip block provides valuable context about comma-separated imports and deduplication, and the formatting adheres to mdBook standards.

Please ensure the referenced image file exists at docs/user-guide/src/images/ui-keywords.webp.

docs/user-guide/src/attachments.md (1)

1-17: Comprehensive attachments documentation. The step-by-step guide effectively walks through the attachment workflow, and the tip block clearly explains the dual-hashing integrity feature. The writing is clear and user-focused.

Please verify that the image file exists at docs/user-guide/src/images/ui-file-attachments.webp.

docs/user-guide/src/metadata.md (1)

1-21: Thorough metadata documentation with excellent visual-textual integration. The content flows logically from basic operations to advanced field properties editing, and the tip about field type immutability is crucial information for users. The numbered annotations align well with the image references.

Please verify that both referenced images exist: docs/user-guide/src/images/ui-metadata-overview.webp and docs/user-guide/src/images/ui-metadata-edit-field.webp. Also confirm the internal link format at line 4 works correctly with your mdBook setup.

docs/user-guide/book.toml (1)

1-8: Clean and appropriate mdBook configuration. The title accurately reflects the project, authors attribution is present, and the theme selections (light default with ayu dark theme) provide a pleasant user experience.

docs/user-guide/src/SUMMARY.md (1)

1-12: Well-organized table of contents structure. The hierarchy properly reflects the documentation organization, with UI subsections appropriately nested under the UI Overview section. The file path format follows mdBook conventions.

docs/user-guide/src/quickstart.md (1)

1-12: Well-structured workflow guide that provides clear, actionable steps.

The progression from launching the application through saving the archive is logical and accessible. Cross-references to related documentation sections are appropriately placed to support users without overwhelming them with inline details. The emphasis on offline operation and import compatibility is a thoughtful touch for the target user base.

docs/user-guide/src/datetime.md (1)

1-11: Concise documentation of the Date & Time Picker feature.

The guide clearly explains the picker's capabilities and storage behavior. The tip about backfilling older experiments is practical guidance that acknowledges a common use case. Image placement and admonition formatting follow mdBook conventions correctly.

Comment thread docs/user-guide/src/markdown.md
@Athemis Athemis changed the title Docs/user guide docs: add user guide Dec 10, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
docs/user-guide/src/markdown.md (1)

21-26: Engage: We must resolve the markdown blockquote formatting violation that persists.

It appears the blank line within the [!TIP] blockquote—which was previously flagged—remains unaddressed. A blank line inside the blockquote at line 24 violates the MD028 markdown linting rule, disrupting proper blockquote rendering and formatting consistency.

Apply this diff to eliminate the unnecessary blank line and restore formatting integrity:

 > [!TIP]
-> 
 > - You can use all features of [CommonMark](https://commonmark.org) with some additional Markdown extensions like tables and math.
 > - Use raw HTML in the Markdown code for more advanced formatting. Keep in mind though that HTML is sanitized when exporting the ELN archive to prevent XSS attacks which may remove **potentially unsafe** HTML tags (e.g., `<script>`).

This ensures the blockquote structure remains cohesive and compliant with markdown best practices, much like maintaining proper command protocols aboard a starship.

🧹 Nitpick comments (2)
.github/workflows/mdbook.yml (2)

32-34: Consider adding Cargo cache to accelerate workflow execution.

The workflow reinstalls mdBook on every run via cargo install. Since mdBook is a stable external tool, caching the Cargo build artifacts would accelerate subsequent workflow executions—particularly valuable if you trigger deployments frequently.

Here's a suggested enhancement to add Cargo caching:

      - name: Checkout
        uses: actions/checkout@v6
+     - name: Cache Cargo
+       uses: Swatinem/rust-cache@v2
      - name: Install mdBook
        run: |
          cargo install --version ${MDBOOK_VERSION} mdbook

38-43: Consider adding an explicit verification step after the mdBook build.

Your workflow builds the documentation and uploads the artifact without explicitly verifying that the build succeeded or that the output directory exists. While GitHub Actions will fail the step if the build fails, adding an explicit verification step would enhance clarity and provide better diagnostics if something goes awry.

Here's an optional enhancement to add explicit verification:

      - name: Build with mdBook
        run: mdbook build docs/user-guide
+     - name: Verify build output
+       run: |
+         if [ ! -d "docs/user-guide/book" ]; then
+           echo "Error: mdBook build did not produce the expected output directory"
+           exit 1
+         fi
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: docs/user-guide/book
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eac474c and 146d2bc.

📒 Files selected for processing (2)
  • .github/workflows/mdbook.yml (1 hunks)
  • docs/user-guide/src/markdown.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-03T16:16:45.376Z
Learnt from: CR
Repo: Athemis/ELNPack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-03T16:16:45.376Z
Learning: Applies to src/ui/components/markdown.rs : `src/ui/components/markdown.rs` implements markdown editor with toolbar, cursor-aware insertions, and text area.

Applied to files:

  • docs/user-guide/src/markdown.md
🪛 markdownlint-cli2 (0.18.1)
docs/user-guide/src/markdown.md

24-24: Blank line inside blockquote

(MD028, no-blanks-blockquote)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (rust)
🔇 Additional comments (1)
.github/workflows/mdbook.yml (1)

1-55: Make it so: Your GitHub Pages deployment workflow is well-structured and properly configured.

The workflow elegantly separates build and deploy responsibilities, appropriately scopes permissions for GitHub Pages, and maintains consistent path references throughout. The use of concurrency controls with cancel-in-progress: false ensures production deployments complete uninterrupted.

Comment on lines +27 to +28
env:
MDBOOK_VERSION: 0.5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

latest stable version of mdBook release

💡 Result:

Latest stable mdBook release: v0.5.1 (released Nov 20, 2025). (github.com)

Citations:


mdBook version 0.5 is outdated; consider updating to v0.5.1.

The workflow pins MDBOOK_VERSION: 0.5, but the latest stable release is v0.5.1 (released Nov 20, 2025). Update to the latest patch version unless there is a specific reason to stay on an older release. Additionally, consider documenting why this version was chosen for future maintainers.

🤖 Prompt for AI Agents
.github/workflows/mdbook.yml lines 27-28: the workflow pins MDBOOK_VERSION to
0.5 which is outdated; update the MDBOOK_VERSION value to 0.5.1 (the latest
patch) in the env block and, if applicable, update any workflow steps or
comments that reference the version; also add a short inline comment or
workflow-level note documenting why 0.5.1 was chosen (or add a link to the
release notes) so future maintainers understand the decision.

@Athemis
Athemis marked this pull request as ready for review December 10, 2025 14:08
@Athemis
Athemis merged commit 406c290 into main Dec 10, 2025
9 of 10 checks passed
@Athemis
Athemis deleted the docs/user-guide branch December 10, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant