Commit graph

33 commits

Author SHA1 Message Date
Kumi f01390eb5c
feat(users): Change upload media to link
Replaced the "Upload media" button with a hyperlink to improve
navigation flow. This enhances user experience by making media uploads
more intuitive and aligned with typical web navigation patterns. The
change was implemented in the category template of the users section to
ensure consistency across the platform.
2024-03-17 10:33:15 +01:00
Kumi 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
Kumi 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
Kumi 0634e5b536
feat(users): enhance media serializer context
Updated the FileUploadView by adding request context to the
OriginalMediaSerializer. This enhancement ensures that the serialization
process has access to the request data, which can be crucial for
accurately constructing URLs and handling permissions. By including the
request context, we can now generate more dynamic and context-aware
serialized data, improving the API's flexibility and the client's
ability to utilize the provided data effectively.

This change is a direct response to the need for more detailed and
context-sensitive responses from our API endpoints, facilitating better
integration with frontend components that rely on complete and accurate
URL constructions for media assets.
2024-03-16 21:52:20 +01:00
Kumi 0f888da376
feat: assign category to media post-serialization
Changed the approach to assigning a category to an uploaded media file
by fetching the Category instance from the database after the media file
has been serialized and saved. This ensures that the category assigned
is validated against existing categories in the database, enhancing data
integrity and error handling when an incorrect category is specified.
Previously, the assignment used a direct extraction from request
arguments which might not have validated the category's existence.
2024-03-16 21:46:00 +01:00
Kumi 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
Kumi 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
Kumi 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
Kumi 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
Kumi 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
Kumi 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
Kumi 77eaa3be6a
feat(users): enhance category page layout and
permissions

Updated the category listing page to improve visual layout by adjusting
the column widths for better readability and user experience.
Additionally, clarified the interaction possibilities between
categorized content with a slight modification in the description,
emphasizing teleports among VR projects.

Expanded the visibility of category ownership to include superusers,
ensuring they have necessary oversight across all categories, regardless
of personal ownership. This change aims to streamline project management
and enhance administrative capabilities.

These adjustments contribute to a more intuitive navigation and
management experience for users while providing superusers with better
control and oversight over category interactions and ownership.
2024-03-16 10:49:02 +01:00
Kumi 957d99adcb
feat: Enhance category management UX
Introduced a more interactive and user-friendly design on the categories
page by streamlining the content layout and adding a "Create category"
button. This improvement aims to make the management and organization of
VR projects more intuitive for users, facilitating easier navigation and
category creation. Additionally, new views for media upload and category
creation have been implemented, expanding the platform's functionality
and offering users more control over their content.

These changes are in response to user feedback requesting a more
organized and accessible way to handle categories and media within the
platform. By making these adjustments, we're enhancing the overall user
experience and laying the groundwork for future feature expansions.
2024-03-16 10:39:22 +01:00
Kumi db79a2a39c
feat: Update tab label in user profile
Changes the label of the media tab from "Created Media" to "Uploaded
Media" to more accurately reflect the user activity it represents. This
adjustment improves clarity and aligns with the terminology users see
elsewhere in the app.
2024-03-16 09:34:50 +01:00
Kumi ceb2d022dc
feat(users): add create/upload buttons to UI
Introduced "Create scene" and "Upload media" buttons in the category
view to enhance usability by providing direct access to common actions.
This change aims to improve the user experience by making it easier for
users to create new scenes and upload media without navigating away from
the category page. The layout has been adjusted with flexbox to maintain
a clean, organized appearance.
2024-03-16 08:07:40 +01:00
Kumi 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
Kumi c9971f22fe
feat(tours): allow nullable category relations
Updated `originalmedia` and `scene` models to allow their `category`
fields to be nullable. This adjustment permits entries without a
specific category, enhancing flexibility in content organization. Upon
deletion of a category, related records will now have their category set
to null instead of being deleted, preventing unintended data loss.

Resolves issues with rigid category assignments and improves data
resilience.
2024-03-16 07:30:53 +01:00
Kumi 2bbb39860e
feat: refine access control for media and scenes
Introduced new permission checks in the models, serializers, and views
across the application to enhance user access control and data privacy.
This update ensures that sensitive media and scene information are only
accessible to users with appropriate permissions, including public
access checks and enhanced controls for superusers and staff. These
changes streamline permission logic, making it more robust and
maintainable. Serialization now conditionally includes media and scenes
based on user permissions, significantly improving data security and
user experience by preventing unauthorized access.

This enhancement aligns with our ongoing efforts to bolster security
measures and ensure compliance with data protection regulations.
2024-03-16 07:26:49 +01:00
Kumi 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
Kumi 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
Kumi 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
Kumi e0130ef3c2
feat(tours): remove unused comment 2024-03-15 15:08:08 +01:00
Kumi 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
Kumi 0888e6132a
feat: add initial SECURITY.md for project
guidelines

Introduced a Security Policy in the newly added SECURITY.md file,
outlining the project's current security status, cautioning users about
its early-stage development, and providing guidance on reporting
vulnerabilities. This establishes a clear protocol for communicating and
handling security concerns, ensuring contributors and users have a
direct channel for raising security issues with the Private.coffee
security team. This move reflects a proactive approach to security and
transparency as the project evolves.
2024-03-15 14:33:14 +01:00
Kumi 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
Kumi 8c3ea535e5
feat: Upgrade project setup and dependencies management
This commit represents a significant overhaul of the development and
setup processes for the Quackscape project. Key changes include the
transition from a requirements.txt-based dependency management system to
Poetry.
These updates aim to streamline the setup process

- Transitioned to Poetry for improved dependency resolution and package
management.
- Consolidated Django management commands under the quackscape-manage
script to simplify command execution and project management.
- Updated README.md to reflect the new setup procedures, emphasizing
ease of setup and the flexibility to support multiple database backends.

The shift to Poetry and the introduction of a custom management command
tool reflects an effort to modernize the project's infrastructure,
making it more accessible to contributors and easier to maintain.
2024-03-15 09:36:18 +01:00
Kumi 743f97a6ab
feat: introduce Code of Conduct and Contributing Guidelines
Added a comprehensive Code of Conduct and Contributing Guidelines for
the Quackscape project to foster a positive community environment and
streamline the contribution process. The Code of Conduct pledges an
inclusive, harassment-free experience for all contributors, while the
Contributing Guidelines outline steps for asking questions, reporting
bugs, suggesting enhancements, and making first code contributions.
These additions aim to enhance participation clarity, ensure respectful
interactions, and encourage contributions by outlining expectations and
procedures, thus promoting a healthier, more collaborative development
atmosphere.
2024-03-15 09:33:56 +01:00
Kumi 1344adc37d
Added LICENSE and enhanced project documentation
Introduced an MIT LICENSE file for open sourcing the project, ensuring
that users are aware of their rights to use, modify, and distribute the
software. This change underlines our commitment to the open source
community and clarifies usage terms.

Updated the README.md with detailed development setup instructions,
making it easier for new contributors to get started with the project.
The amendments include steps from cloning the repository to starting the
development server, highlighting mandatory installations and
configurations for a smooth setup.

Adjusted settings.py and settings.dist.ini for better clarity and
customization. Simplifications in settings.py improve code readability
and maintainability. The addition of settings.dist.ini allows users to
easily configure their development and production environments per their
needs without altering core configuration files.

These enhancements aim to simplify the contribution process, foster
community involvement, and ensure a transparent and flexible setup for
developers engaging with the project.
2024-03-14 18:14:25 +01:00
Kumi 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
Kumi 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
Kumi 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
Kumi 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
Kumi d6e76e8cfd
A mo-mo-mo-monster 2024-03-11 15:56:03 +01:00