Commit graph

28 commits

Author SHA1 Message Date
4c90218490
feat(editor): enhance element property forms
Refined the `createElementPropertiesForm` in the editor to include
position and rotation inputs, improving user interaction for specifying
these attributes. Simplified the function's parameters by removing
unnecessary event and thetaStart arguments, streamlining the codebase.
Also corrected the naming of `destination_x`, `destination_y`, and
`destination_z` input names for consistency. Marked handling of unknown
element types with a TODO to prompt future development. This enhancement
allows for more precise control over element positioning and
orientation, directly impacting user experience positively.
2024-03-28 11:26:24 +01:00
ae3d7ffc98
feat: improve UI visibility and interaction
Enhanced UI element visibility and interaction across the editor and
scene components. By switching to classList manipulation for showing and
hiding UI elements, the approach aligns better with modern best
practices, ensuring smooth transitions and consistency in user
experience. The addition of `!important` in the CSS for the `.hide`
class guarantees the override of conflicting styles, addressing
potential visibility issues. Adjustments in HTML formatting enhance
readability and maintainability without altering functionality. This
change, while seemingly minor, significantly improves the user's ability
to intuitively navigate and interact with the UI, potentially reducing
frustration and increasing overall user satisfaction.
2024-03-28 11:15:36 +01:00
4043f031ab
refactor(editor.js): streamline element creation form generation
Replaced multiple specific functions for creating MarkerElement,
ImageElement, and TeleportElement forms in the editor with a single,
switch-based function titled createElementPropertiesForm. This
enhancement consolidates form generation logic, reducing redundancy and
improving maintainability. It dynamically generates input fields based
on the element type selected, simplifying future extensions or
modifications to element properties. Additionally, this refactoring
ensures a more consistent user experience by uniform handling of
different element types during creation and modification.

The new approach allows for easier addition of new element types and
their corresponding inputs, adhering to the DRY principle and promoting
code readability.
2024-03-28 11:06:14 +01:00
4f676e3b6a
feat(editor): enhance element positioning with
drag

Introduce enhanced drag-and-drop capabilities for elements within the
editor. This enhancement includes setting elements to be draggable upon
interaction and capturing their final position post-drag. This change
aims to improve the user experience by providing a more intuitive and
direct way to position elements within the editor environment.
Additionally, the removal of the universal "click-drag" attribute
assignment from all entities (except "A-SKY") during the loading phase
streamlines the initial setup by applying the attribute selectively,
based on user interaction, which may improve performance and reduce
unnecessary processing.

The package.json file has been updated to reflect the "Private.coffee
Team" as the project's author, signaling a formal acknowledgment of the
development team's contribution and ownership.
2024-03-28 10:22:42 +01:00
429975833a
feat: integrate aframe-click-drag and improve
skybox handling

Introduced the @kumitterer/aframe-click-drag-component for enhanced
interaction within the VR editor, enabling objects to be click-draggable
except for the skybox element. This selective application of click-drag
functionality enriches user experience by preserving the intended static
background. Additionally, refactored the A-Frame dependency management,
ensuring a coherent and up-to-date project structure.

- Upgraded and consolidated A-Frame imports across JavaScript files for
consistency.
- Excluded the "A-SKY" element from click-drag attributes to avoid
unintended interactions with the scene background.
- Added deep-equal package for enhanced object comparison
functionalities.

This update aims to streamline user interactions within 3D scenes,
offering more intuitive and immersive navigation capabilities.
2024-03-27 19:54:48 +01:00
b2da4b381b
feat(editor): add element property forms
Adding dynamic form rendering in the editor for marker, image, and
teleport elements. Now, when creating a new element, a form is
dynamically generated based on the element type selected. This
enhancement improves the user experience by providing a tailored
interface for inputting properties specific to each type of element,
such as title, text for markers, and file upload for images. This update
streamlines the creation process and ensures users have a clear,
context-specific set of fields when adding new elements to their
projects.
2024-03-27 10:51:05 +01:00
db17637b9d
feat(editor): enhance element creation UX
Adjusted the modal content in the editor's JavaScript to dynamically
update based on the type of element being created, improving user
interaction and feedback during the element creation process. The change
includes fixing incorrect references to modal labels and contents,
adding CSRF token support for form submissions, and dynamically
showing/hiding buttons based on the context of the element creation.
Additionally, event listeners are set up to handle different element
types (Marker, Image, Teleport), further enhancing the user experience
by tailoring the UI to the selected element type. This update aims to
make the editor more intuitive and responsive to user actions, reducing
potential confusion and improving the flow of creating various types of
elements within the application.
2024-03-27 10:16:14 +01:00
6da2f19f42
feat: integrate media deletion and swap icon
library

- Implemented the media deletion functionality, allowing users to delete
media entries directly from the category view. This enhances the
manageability of content within the platform, providing a more intuitive
and streamlined experience for users managing their media.
- Transitioned from FontAwesome to Phosphor Icons, opting for a lighter
and more flexible icon library that better aligns with the design ethos
of the application. This change not only introduces a fresh aesthetic
but also contributes to slightly improved page load times due to the
decreased footprint of the icon library.
- Updated various UI elements across the platform to maintain a
consistent look and feel, including adjustments in the user area CSS to
ensure visual compatibility with the new icon set.
- Broadened the scope of `.gitignore` to cover all JavaScript files
within the static/js directory, eliminating potential version control
clutter caused by dynamically generated or dependency-included JS files.

These changes collectively aim to refine user interaction and ensure a
more cohesive visual presentation throughout the application.
2024-03-27 10:08:07 +01:00
42e9de6942
feat: enhance UI and extend form functionality
This update brings several enhancements to the user interface and
extends the forms functionality across the application. Specifically,
the changes include the introduction of `django-crispy-forms` and
`crispy-bootstrap5` to improve form aesthetics and usability
significantly. Additionally, the admin area now features enhanced link
color for better visibility, and user interface improvements have been
made across various templates, like adding direct edit and delete
category links and more intuitive navigation options for better user
experience. Moreover, the inclusion of new forms for Scene, Category,
and Original Media creation aligns with the app's need for structured
data entry and complements the existing models by ensuring a more
user-friendly interaction with the database.

Key changes include:
- Introduction of `django-crispy-forms` and `crispy-bootstrap5` for
better form rendering.
- UI enhancements for clarity and ease of use in the admin area and
templates.
- New forms for Scene, Category, and Original Media to streamline
content creation processes.

These changes aim to improve both the appearance and functionality of
the application, making it more appealing and accessible to users while
facilitating easier content management.
2024-03-27 09:22:04 +01:00
d921c2dcad
feat: add media resolution updates & API endpoints
Introduced a new API endpoint to retrieve media for a given category,
enhancing the user experience by dynamically updating thumbnails
post-upload based on available resolutions. This connects the frontend
to the backend efficiently, ensuring users can see the immediate impact
of their uploads. Additionally, updated serializers and views in the
backend to support this functionality, alongside improving code comments
for future development clarity.

- Implemented `getCategoryMedia` in the JS API for fetching media
resolutions.
- Enabled dynamic thumbnail updates in the user area post file upload,
improving visual feedback.
- Extended the Django REST framework routers to include the new media
endpoint, facilitating easier access to media items.
- Updated the `OriginalMediaSerializer` to include `category` for more
detailed media information.
- Enriched task and views files with necessary TODO comments to guide
future enhancements and exception handling.

This change significantly improves the content management workflow,
making it more interactive and user-friendly.
2024-03-17 08:35:40 +01:00
6dc56e02bd
feat(userarea.js): enhance file upload feedback
Enhanced the file upload feedback mechanism in `userarea.js` by
introducing a clearer, success indication and preparing for future
implementations where upload completion will trigger additional checks
against the API for resolution availability. This change brings a more
intuitive user experience during file uploads and lays groundwork for
next steps in upload handling, ensuring users are better informed of the
upload status in real-time.

- Imported `getElementById` for future feature expansion.
- Added a TODO comment as a placeholder for upcoming API check
functionality.
2024-03-16 21:57:25 +01:00
f5723de9fd
refactor(userarea.js): senhance file upload
UX

Uniformly changed single quotes to double quotes for consistency
throughout userarea.js. Improved the file upload feature by refining the
visual feedback during file upload processes. This includes more
descriptive progress and success/error messages, ensuring users have
clear, immediate insight into the state of their uploads. Additionally,
refined the data submission structure in `uploadFile`, explicitly
assigning file type and title, optimizing for better server-side
processing. These changes enhance code readability and user experience.
2024-03-16 21:44:22 +01:00
53d90cb070
feat(userarea): handle file upload success more
visibly

Improve user feedback during file uploads by explicitly handling HTTP
201 responses as successful uploads. Upon a successful upload, the
progress bar now turns green (`bg-success`) and displays a "Success!"
message, providing a clearer and more immediate visual cue to the user
that their file has been successfully uploaded. This change addresses
usability issues by making the upload progress and outcome more
discernible to users.
2024-03-16 21:35:45 +01:00
7d78c5d4a0
feat: Introduce file upload functionality
This commit overhauls the user area with the addition of comprehensive
file upload capabilities for images and videos. Notably, it integrates
front-end enhancements for drag-and-drop uploads in the user area and
introduces a secure back-end handling process. The back-end adjustments
include a new media upload view and adjustments to image and video
models to support large file handling through settings for maximum image
pixel limits. Additionally, the refactor standardizes CSRF token
retrieval across JavaScript modules, improving security and code
maintainability.

- Front-end additions include detailed user feedback during the file
upload process, such as progress bars and success/error indicators.
- Back-end improvements ensure large image files are processed
efficiently, mitigating potential memory issues by configuring a maximum
image pixel threshold.
- Consolidating the CSRF token retrieval into the `api.js` module
centralizes security mechanisms, reducing redundancy and enhancing the
codebase's clarity.

Overall, these changes enrich the platform's media management
capabilities, bolster security practices, and improve user experience
through intuitive interface updates and robust back-end processing.
2024-03-16 21:30:12 +01:00
06fb7ac04e
feat(scene.js): streamlined import statements
Removed unused "getCategory" import from the "scene.js" file to clean up
the code and improve maintainability. This change simplifies the
codebase by eliminating unnecessary imports, thus enhancing readability
and potentially reducing the bundle size slightly, assuming there are no
other references to "getCategory" that would keep it in the final
bundle. This adjustment forms part of an ongoing effort to optimize and
streamline the codebase.
2024-03-16 11:21:44 +01:00
85c44f985d
refactor(scene): modularize sidebar and navbar loading
Refactored the scene script to extract the logic for loading sidebars
and navbars into separate, modular files. This change enhances code
maintainability and readability by compartmentalizing responsibilities
and clarifying function boundaries. Now, `navbar.js` and `sidebar.js`
handle the UI component rendering, allowing for easier updates and
potential reuse. Adjusted conditional rendering logic to ensure
exclusive navbar or sidebar presence, aligning UI behavior with design
expectations.

This commit signifies a step towards modular architecture in the
frontend codebase, facilitating future expansion and modification.
2024-03-16 11:16:26 +01:00
c463de0ada
feat: add user permissions management
Implemented user permissions management functionality across the system,
enhancing control over category access and operations. This includes a
new DataTable in the user area for permissions, updated model relations
with explicit related names for better query readability, and a
migration to enforce these changes at the database level. Additionally,
the UI now features options for ending category membership, deleting
categories, inviting users, and transferring ownership based on user
roles and permissions. This comprehensive update aims at providing more
granular access control and operational flexibility for category owners
and system administrators.
2024-03-16 11:07:58 +01:00
e9e8719a93
feat: improve sidebar UX with toggle functionality
Introduced new styles for the sidebar's open and close buttons to
enhance visibility and user interaction. Updated the sidebar logic in
the JavaScript to include a toggle functionality, allowing users to
easily open and close the sidebar. This improves the user experience by
making navigation more intuitive and the UI cleaner. The 'Close Sidebar'
button now directly closes the sidebar, and a new 'Open Sidebar' button
appears when the sidebar is closed, providing a clear action cue to the
users.
2024-03-16 07:58:14 +01:00
0999d2f16e
feat: add dynamic sidebar for scenes
Introduce a new sidebar in the UI for enhanced navigation through
scenes. This feature includes CSS modifications for styling, updates in
JavaScript to dynamically load sidebar content based on scene
categories, and template adjustments to include the sidebar option. By
leveraging the Collapse component from Bootstrap alongside existing
infrastructure, this addition enriches user interaction by providing a
convenient and visually appealing method to explore different scenes
within the application. The sidebar's design and functionality are
thoughtfully integrated to ensure a cohesive and user-friendly
experience.

The decision to implement a sidebar stemmed from the need to improve
navigational efficiency and user engagement with the content. This
change is part of a broader effort to enhance the UI/UX of the
application, aiming to make the exploration of scenes more intuitive and
accessible.
2024-03-15 19:27:19 +01:00
e3cff5b9b7
feat: add dynamic navbar to scenes
Introduced a new CSS file for styling a fixed navbar in scenes,
enhancing user navigation within the virtual environment. Modified
scene.js to include fetching categories and generating a navbar with
scene options dynamically based on the category of the current scene.
This allows users to switch scenes more intuitively. The `nonavbar`
attribute was added for scenes where the navbar should be omitted,
providing flexibility in scene presentation. Additionally, streamlined
CSS and SCSS imports across JS files for consistency and removed an
unnecessary SCSS import from editor.js, optimizing load times and
project structure.

This update significantly improves user experience by facilitating
easier navigation and scene exploration within the application.
2024-03-15 16:41:37 +01:00
2e819ba0a6
feat(editor): add missing CSRF token retrieval function
Implemented a new function to fetch the CSRF token from cookies in the
editor's JavaScript. This ensures secure AJAX requests by validating the
client's sessions, enhancing the application's security against
cross-site request forgery attacks. The addition is a crucial step
towards securing forms and API calls within the editor environment.
2024-03-15 15:09:43 +01:00
bcca11aab9
refactor(js): streamline frontend SCSS import
Migrated the SCSS import for the frontend directly into editor.js and
userarea.js from frontend.js, removing redundancy by consolidating style
imports. This adjustment enables more coherent management of SCSS files
and removes the need for a separate frontend bundle. Consequently,
frontend.js and its references in HTML templates were removed to clean
up the codebase and simplify the asset pipeline. These changes should
make future maintenance of CSS easier and improve load times by reducing
unnecessary scripting and network requests.
2024-03-15 15:06:15 +01:00
4779f89513
feat: integrate FontAwesome and enhance scene permissions
- Added FontAwesome for enriched UI iconography.
- Implemented permission checks in scene edit view to prevent
unauthorized edits.
- Adjusted scene links in the category template for direct edit access,
streamlining the user workflow.

These changes aim at both enhancing the visual elements of the interface
and strengthening the security model by ensuring that only authorized
users can edit scenes. The direct edit links in the category view
further simplify navigation, making the system more intuitive for users.
2024-03-15 09:36:44 +01:00
013d02a15c
Enhance editor UI and user content management
Introduced significant updates to the user interface for editing VR
scenes, adding new CSS styles for a coherent and modern look.
Implemented data tables for robust content management in the user area,
now users can easily navigate through scenes and media with DataTables
integration. Expanded the API with category retrieval capabilities,
enabling dynamic content categorization.

The editor now seamlessly integrates into the UI with a sidebar for
properties editing, improving usability. The teleportation element
creation and modification logic has been significantly refined,
including a search-enabled dropdown for destination selection, making it
more user-friendly. Added thumbnail display for scenes and media in the
user area, enhancing content overview.

This update also introduced user area templates and routes, providing a
foundational structure for user content management functionality,
including categories and individual category views.

Refactored JavaScript imports to align with the new editor CSS and
adjusted scene loading to support embedded scenes, improving the
flexibility and usability of scene components.
2024-03-14 17:28:14 +01:00
06a00262a0
Remove debug logs from scene initialization
Removed console.log statements for x, y, and z coordinates in the
QuackscapeScene class. This cleanup reduces clutter in the console
during scene initialization, leading to a cleaner and more professional
debug output. No functional impact on scene loading.
2024-03-11 19:50:56 +01:00
635ab177dc
Add iOS texture size limit
Added a workaround to limit texture size on iOS devices to prevent
issues with rendering performance. This change introduces a detection
mechanism for iOS and caps the maximum texture size to 8192 when an iOS
device is identified.
2024-03-11 19:49:48 +01:00
304cb8f63d
Introduce Z-axis handling across the app
This update introduces support for a third dimension (Z-axis) in scene
positioning and orientation, enhancing 3D scene rendering capabilities.
Changes include parsing the Z-coordinate attribute in scene elements,
updating the `loadScene` function to accommodate the new axis, and
extending the models to store this additional data. This pivotal
enhancement allows a more refined and immersive user experience by
enabling depth control in scene navigation and interactivity. The
modification paves the way for future developments in 3D scene
manipulation and interaction within the application.
2024-03-11 16:29:47 +01:00
d6e76e8cfd
A mo-mo-mo-monster 2024-03-11 15:56:03 +01:00