Skip to content

Merge pull request #2 from jaumet/feature/client-side-casual#3

Open
jaumet wants to merge 4 commits intocasual-jsfrom
master
Open

Merge pull request #2 from jaumet/feature/client-side-casual#3
jaumet wants to merge 4 commits intocasual-jsfrom
master

Conversation

@jaumet
Copy link
Owner

@jaumet jaumet commented May 28, 2025

Refactor: Convert Casual to a client-side application

This commit introduces several new features to enhance the Casual
visualization tool:

1.  **Default Canvas Animation:**
    - The TagCanvas cloud now has a default, gentle animation when the
      page loads and the mouse is not interacting with it.
    - Achieved by adjusting TagCanvas options (`freezeActive: false`,
      `initial` speeds, `maxSpeed`).

2.  **Clicked Keyword Path/History:**
    - A visual path of searched keywords (e.g., "Term1 > Term2 > Term3")
      is now displayed, allowing you to track your navigation.
    - Implemented by storing history in JavaScript and updating a
      dedicated div in the UI.

3.  **Wikipedia Autocomplete for Keyword Input:**
    - The keyword input field now features autocomplete suggestions
      fetched from the Wikipedia API (opensearch) as you type.
    - Suggestions are displayed in a dropdown, and selecting one
      populates the input and triggers a search.
    - Includes debouncing for API calls and respects the selected language.

All features have been tested and integrated into the existing
client-side application structure.
This commit introduces the Wikipath game and enhances your experience
with refined canvas animation controls.

Key new features and changes:

1.  **Wikipath Game:**
    - You can now play a game to navigate from a random start
      Wikipedia page to a random target page using the Casual interface.
    - A "START GAME" button initializes the game, displaying the
      start/target pages and a hop counter.
    - The hop counter increments for each distinct page visited.
    - A win condition is triggered when the target page is reached,
      displaying a congratulatory message.
    - Instructions for the game have been added to the help modal.

2.  **Refined Canvas Animation:**
    - TagCanvas animation now stops when your mouse cursor is directly
      hovering over a specific tag/link in the cloud (`freezeActive: true`).
    - Default animation (using `initial` speeds) remains active when
      your mouse is not over a specific tag or is outside the canvas.

All features have been integrated and tested.
google-labs-jules bot and others added 2 commits May 28, 2025 20:54
Output:
Feat: Add tooltips to Wikipath game and verify animation

This commit introduces tooltips for the Start and Target pages in the
Wikipath game and verifies the canvas animation behavior.

Key changes:

1.  **Wikipath Game Tooltips:**
    - When hovering over the Start or Target page titles in the game UI,
      a tooltip now appears.
    - The tooltip displays a short summary of the Wikipedia page (fetched
      via API) and a direct link to view the full page on Wikipedia
      (opens in a new tab).
    - This provides players with context about the pages they are
      navigating between.

2.  **Canvas Animation Verification:**
    - Confirmed that the TagCanvas option `freezeActive: true` is set,
      ensuring that the cloud animation stops when the mouse cursor
      is directly over a tag.
    - Default animation (using `initial` speeds) remains active when
      the mouse is not over a specific tag or is outside the canvas.

All features have been integrated and tested.
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