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

feat: Add trigger specification cache to Htmxor #44

Merged
merged 18 commits into from
May 13, 2024
Merged

Commits on May 9, 2024

  1. feat: Add trigger specification cache to Htmxor

    This update introduces a trigger specification cache to the Htmxor library. The new feature improves parsing performance by storing evaluated trigger specifications, albeit at the cost of increased memory usage. Users can define a simple object for a never-clearing cache or implement their own system using a proxy object.
    
    The changes include:
    - Addition of `TriggerSpecificationCache` class and related methods in `HtmxConfig.cs`
    - Creation of new files `HtmxTriggerSpecification.cs`, `ITriggerBuilder.cs`, `TriggerBuilder.cs`, `TriggerModifierBuilder.cs` and `TriggerQueueOption.cs` to handle trigger specifications
    - Update in the Program file to show use of this new feature with keyup and mouseenter events
    tanczosm committed May 9, 2024
    Configuration menu
    Copy the full SHA
    908774b View commit details
    Browse the repository at this point in the history
  2. feat: enhance trigger specification creation in Htmxor

    Refactored the trigger specification in HtmxorExamples. Added static Trigger class to simplify creation of triggers that provides more fluent methods for constructing triggers.
    tanczosm committed May 9, 2024
    Configuration menu
    Copy the full SHA
    a015b17 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4b4270a View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. feat: Update trigger methods in Razor components

    Updated the hx-trigger method calls in several Razor components to use a more structured approach. This includes changes in InfiniteScroll, TriggeringEvents, and TriggeringEventsIndirectly examples. Also updated the TriggerSpecificationCache in Program.cs to reflect these changes and demonstrate usage of different triggers.
    tanczosm committed May 10, 2024
    Configuration menu
    Copy the full SHA
    52418e5 View commit details
    Browse the repository at this point in the history
  2. fix: Update trigger event handling

    Updated the way trigger events are handled in the code. Replaced 'WithCondition' method with 'From'.
    tanczosm committed May 10, 2024
    Configuration menu
    Copy the full SHA
    1eed04a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9ceda12 View commit details
    Browse the repository at this point in the history
  4. refactor: Expanded Trigger functionality in Htmxor library

    Adds documentation for each of the TriggerBuilder and TriggerModifierBuilder methods
    tanczosm committed May 10, 2024
    Configuration menu
    Copy the full SHA
    1bbf7a9 View commit details
    Browse the repository at this point in the history
  5. test: Add TriggerBuilder and TriggerSpecificationCache unit tests

    Added comprehensive unit tests for the `TriggerBuilder` and `TriggerSpecificationCache` classes. These tests cover all methods in both classes, ensuring correct functionality of trigger creation, modification, and caching. The tests also validate the correct JSON serialization of triggers.
    tanczosm committed May 10, 2024
    Configuration menu
    Copy the full SHA
    f60b979 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2024

  1. feat: update trigger constants and usage

    Added new constant values for triggers and trigger modifiers in the Constants class. Updated TriggerBuilder to use these constants instead of hardcoded strings, improving code maintainability and consistency.
    tanczosm committed May 12, 2024
    Configuration menu
    Copy the full SHA
    ae84ae2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a4f0f96 View commit details
    Browse the repository at this point in the history
  3. style: reformat test files for readability

    Reformatted the `TriggerBuilderTests.cs` and `TriggerSpecificationCacheTests.cs` test files to improve code readability. No changes were made to the logic or functionality of the tests.
    tanczosm committed May 12, 2024
    Configuration menu
    Copy the full SHA
    803a848 View commit details
    Browse the repository at this point in the history
  4. style: adjust code formatting and comments

    Adjusted the indentation in several files to improve readability. Also, corrected a typographical error in a comment.
    tanczosm committed May 12, 2024
    Configuration menu
    Copy the full SHA
    bb39840 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    aa53ae0 View commit details
    Browse the repository at this point in the history
  6. refactor: rename 'selector' to 'cssSelector'

    Renamed the variable 'selector' to 'cssSelector' across multiple methods in SwapStyleBuilder and SwapStyleBuilderExtension classes for better clarity and understanding of its purpose. This change does not affect the functionality of the code.
    tanczosm committed May 12, 2024
    Configuration menu
    Copy the full SHA
    781ffdb View commit details
    Browse the repository at this point in the history
  7. docs: update parameter descriptions in SwapStyleBuilderExtension

    Updated the descriptions of 'cssSelector' parameters in various methods of the SwapStyleBuilderExtension class. The term "CSS cssSelector" has been replaced with "css selector" for clarity and consistency throughout the documentation comments.
    tanczosm committed May 12, 2024
    Configuration menu
    Copy the full SHA
    37989f3 View commit details
    Browse the repository at this point in the history
  8. fix: make cssSelector parameter optional in SwapStyleBuilderExtension…

    … methods
    
    The cssSelector parameter in Scroll, ScrollTop, and ScrollBottom methods of the SwapStyleBuilderExtension class is now optional.
    tanczosm committed May 12, 2024
    Configuration menu
    Copy the full SHA
    6c9b2c2 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. Configuration menu
    Copy the full SHA
    728eca1 View commit details
    Browse the repository at this point in the history
  2. fix: simplified creating trigger spec dictionary using collection exp…

    …ression syntax, removed unneeded abstraction
    egil committed May 13, 2024
    Configuration menu
    Copy the full SHA
    3710af2 View commit details
    Browse the repository at this point in the history