Skip to content

docs: dark theme by default and fix custom event examples#108

Merged
fank merged 1 commit intomainfrom
docs/dark-theme-and-custom-event-examples
Mar 8, 2026
Merged

docs: dark theme by default and fix custom event examples#108
fank merged 1 commit intomainfrom
docs/dark-theme-and-custom-event-examples

Conversation

@fank
Copy link
Member

@fank fank commented Mar 8, 2026

Summary

  • Adds a custom NaturalDocs style (OCAP2) that defaults to Dark theme, with Light/Auto/Black still available via the theme switcher
  • Replaces CBA macros (QGVARMAIN(customEvent)) with the expanded "OCAP_customEvent" string in examples so they're copy-pasteable from external mission scripts
  • Adds missing event examples: contested, string-only endMission, and custom event names via the default handler
  • Removes duplicate OCAP_customEvent doc block from fnc_addEventMission.sqf (now a single-line reference to the handler)

Test plan

  • Verify GitHub Pages rebuild picks up the new style and loads in dark theme
  • Check theme switcher still works (Light/Auto/Black options available)
  • Confirm fnc_handleCustomEvent docs page shows all examples with expanded event names

- Add custom NaturalDocs style that defaults to Dark theme (with
  Light/Auto/Black still available via the theme switcher)
- Replace CBA macros with expanded "OCAP_customEvent" string in examples
  so they are usable from external mission scripts
- Add missing event examples: contested, endMission string variant,
  and custom event names via the default handler
- Remove duplicate OCAP_customEvent doc block from fnc_addEventMission
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the project's documentation by introducing a default dark theme for improved readability and user experience. It also significantly refines the examples for custom events, making them more accessible and practical for users by removing macro dependencies and providing a broader range of use cases. These changes collectively aim to improve the clarity and usability of the project's documentation.

Highlights

  • Documentation Theme: Implemented a custom NaturalDocs style (OCAP2) that defaults to a Dark theme, while retaining options for Light, Auto, and Black themes via a switcher.
  • Custom Event Examples: Replaced CBA macros (QGVARMAIN(customEvent)) with expanded "OCAP_customEvent" strings in documentation examples, making them directly copy-pasteable into external mission scripts.
  • New Event Examples: Added new examples for custom events, including contested, a string-only endMission variant, and custom event names handled by the default handler.
  • Documentation Cleanup: Removed a duplicate OCAP_customEvent documentation block from fnc_addEventMission.sqf, now referencing the primary handler for usage details.
Changelog
  • NaturalDocs.Project/Project.txt
    • Added Style: OCAP2 to the project configuration to apply the new custom documentation style.
  • NaturalDocs.Project/Styles/OCAP2/Style.txt
    • Created a new style definition file for OCAP2 that inherits from Default and configures available themes, setting 'Dark' as the default.
  • addons/recorder/fnc_addEventMission.sqf
    • Removed a redundant documentation block for OCAP_customEvent and replaced it with a reference to OCAP_recorder_fnc_handleCustomEvent for usage and examples.
  • addons/recorder/fnc_handleCustomEvent.sqf
    • Updated existing custom event examples to use the expanded "OCAP_customEvent" string instead of CBA macros.
    • Added new examples for contested events.
    • Included an example for endMission with only a string message.
    • Provided an example demonstrating custom event names handled by the default handler.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request focuses on improving the project's documentation. It introduces a new NaturalDocs style to default to a dark theme, enhancing user experience. The documentation examples for custom events have been updated to be more user-friendly by replacing macros with their expanded string values, making them directly copy-pasteable. Additionally, more examples have been added for completeness, and duplicated documentation has been removed by referencing a single source of truth. These changes are well-implemented and improve the overall quality and usability of the documentation.

@fank fank merged commit e4683e0 into main Mar 8, 2026
1 check passed
@fank fank deleted the docs/dark-theme-and-custom-event-examples branch March 8, 2026 11:39
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