danielfilipealmeida / adventure_studio

Integrated Development Environment (IDE) designed for creating text-based adventure games.
0 stars 0 forks source link

Implement UI for Room Connections #4

Closed danielfilipealmeida closed 2 weeks ago

danielfilipealmeida commented 3 weeks ago

Description:

We need to add the ability to manage room connections within the Room form view. Users should be able to view, add, delete, and edit connections between rooms. The UI should prevent multiple connections to the same room or in the same direction.

Task Breakdown:

  1. Update Room Form View:

    • Add a section to the Room form view that displays all available room connections in a list.
    • Each room connection should show the connected room and the direction.
  2. Add Connection Management:

    • Provide options to add, delete, and edit room connections.
    • Explore the best UI approach, either using a popup window or inline editing within the Room form view. Choose the most user-friendly and intuitive solution.
  3. Prevent Invalid Connections:

    • Implement validation to ensure that:
      • A room cannot have more than one connection to the same room.
      • A room cannot have more than one connection in the same direction (e.g., two connections pointing north).
    • Investigate whether these restrictions can be enforced directly at the model level using SwiftData relationships or whether additional logic is needed in the UI.
  4. UI Considerations:

    • Ensure the UI is user-friendly and consistent with the overall app design.
    • Allow users to easily view and manage room connections without disrupting the main room form.
  5. Testing and Validation:

    • Validate that no duplicate connections are created.
    • Ensure that connections are properly saved, edited, and deleted from the database.
    • Add tests for connection validation and form behavior to ensure it works as expected.

Acceptance Criteria:

Additional Notes: This feature will enable users to effectively manage the layout and navigation between rooms in their adventure. Ensure that connections are easy to manage and adhere to logical constraints.