Skip to content

Conversation

@ZackYang
Copy link
Collaborator

No description provided.

ZackYang and others added 30 commits August 23, 2025 18:34
…ctionality

- Implemented Admin::EpisodesController with actions for listing and creating episodes.
- Added views for episode index and new episode form.
- Introduced validations for episode model attributes.
- Updated routes to include episodes resource under admin namespace.
- Added Api::PresignedUrlsController to handle presigned URL requests for file uploads.
- Introduced PresignedUploadUrlService to generate presigned POST URLs for S3.
- Updated Gemfile to comment out the shrine gem and configured Active Storage to use S3.
- Modified routes to include a new API namespace for presigned URLs.
- Updated credentials for S3 access in config/credentials.yml.enc.
- Added necessary JavaScript files for Axios integration.
- Updated Api::PresignedUrlsController to require admin authentication for presigned URL generation.
- Introduced FileUploadController for handling file uploads via drag-and-drop.
- Implemented UI for file upload with progress tracking and error handling in new episode form.
- Updated episode views to include file upload area and improved duration formatting.
- Updated Admin::AttendeesController, Admin::DashboardController, and Admin::EpisodesController to inherit from Admin::BaseController for shared authentication logic.
- Moved require_admin_authentication method to Admin::BaseController to streamline code and improve maintainability.
- Adjusted episode ordering in Admin::EpisodesController to sort by number and creation date.
- Added Kaminari gem for pagination functionality.
- Updated Admin::AttendeesController and Admin::EpisodesController to paginate results.
- Created PaginationHelper for rendering pagination UI.
- Added shared pagination partial for consistent pagination display across views.
- Configured Kaminari in an initializer for future customization.
…esController

- Added edit, update, and destroy actions to Admin::EpisodesController for managing episodes.
- Created edit view for episodes, utilizing a shared form partial for consistency.
- Introduced delete confirmation via Stimulus controller in episode index view.
- Updated routes to support new actions for episode management.
- Integrated Howler.js for audio file duration retrieval.
- Added new targets for ready state and upload button in the file upload controller.
- Implemented functionality to display selected file information and enable upload action.
- Updated form view to include UI elements for ready state and upload button.
- Improved file validation to capture file size and duration for better user feedback.
Introduce suggested episode number logic in Admin::EpisodesController, ensuring available numbers are provided when creating and editing.

Modify the Episode model to allow the number field to be nullable and add automatic number assignment.

Update the views to display the suggested episode number and automatically assign it on publish.

Add a database migration to enforce uniqueness of published episode numbers and remove the default value.

Add tests to verify the auto-increment functionality of episode numbers.
- Changed the redirection after authentication to point to the admin dashboard instead of the root URL.
- Added a new route for the login page, directing to the sessions controller's new action.
…r handling

- Renamed the method for auto-assigning fields on publish to `auto_assign_published_fields` and enhanced its functionality to also set `published_at` if blank.
- Updated the episode form view to display error messages for each field, highlighting invalid inputs with red borders.
- Ensured that the form provides feedback for suggested episode numbers and other fields, improving user experience during episode creation and editing.
- Added tests to verify the correct behavior of auto-assigning `published_at` and `number` fields when the episode status changes to published.
- Changed the episode index action to retrieve only published episodes, ordered by episode number in descending order.
- Enhanced the duration formatting method to safely handle cases where the published date may be nil, preventing potential errors.
- Modified the cover_image_url method to use ActionController::Base.helpers.asset_path for the default logo image, ensuring proper asset path resolution.
- Introduced new CSS styles for admin buttons, enhancing the UI for various button states (primary, success, danger, warning, secondary).
- Updated the Episode model to include a preview_token attribute, ensuring uniqueness and automatic generation upon creation.
- Enhanced the episodes form to display a preview URL section when the episode status is set to preview, allowing easy copying of the URL.
- Modified the episodes index view to include a button for copying the preview URL, improving accessibility for sharing preview links.
- Changed the button class for creating a new episode to use the new admin button styles.
- Adjusted icon margin for better alignment in the button.
- Removed the click event listener from the drop zone in the file upload controller to streamline functionality.
- Updated the button class in the admin layout to use new admin button styles for consistency across the UI.
- Introduced EasyMDE as a rich text editor for episode descriptions, enhancing user experience with Markdown support.
- Added JavaScript controller for EasyMDE initialization and synchronization with the textarea.
- Included EasyMDE CSS and JS files in the application layout for global access.
- Updated episode form to utilize EasyMDE, improving the description input field with rich text capabilities.
- Enhanced application CSS with custom styles for EasyMDE components, ensuring a cohesive design.
- Added Admin::AttendeesController to handle attendee actions including index, show, new, create, edit, update, and destroy.
- Introduced a form partial for attendee creation and editing, incorporating fields for type, name, bio, avatar URL, and social links.
- Implemented social links functionality with dynamic fields for various platforms, utilizing a new JavaScript controller for managing these links.
- Enhanced the Attendee model with validations for name, type, bio, avatar URL, and social links structure.
- Created views for listing, showing, editing, and adding attendees, ensuring a cohesive user experience across the admin panel.
- Updated routes to include attendees resource for proper RESTful access.
- Updated episode_params to permit guest_ids and host_ids for episode creation and editing.
- Introduced a new JavaScript controller for managing attendee selection, allowing users to select hosts and guests dynamically.
- Added corresponding fields in the episode form for selecting and displaying hosts and guests, improving user experience.
- Implemented logic to manage hidden fields for proper form submission when no attendees are selected.
- Introduced a new image upload field helper to facilitate image uploads for attendee avatars and episode cover images.
- Updated the attendee form to replace the avatar URL field with an image upload button, allowing users to upload images directly.
- Enhanced the episode form to include an image upload field for cover images, improving user experience with direct uploads.
- Created a new JavaScript controller to handle image uploads, including file validation and S3 upload logic.
- Added a shared partial for the image upload field to maintain consistency across forms.
- Updated attendee_params method to prioritize the 'attendee' key if present in params, enhancing clarity and consistency in parameter handling.
- Simplified fallback logic for determining the parameter key based on attendee type, improving code readability.
…configuration

- Introduced dotenv-rails gem to manage environment variables for sensitive data.
- Updated PresignedUploadUrlService to use environment variables for S3 credentials and endpoint.
- Refactored storage.yml to retrieve S3 configuration from environment variables instead of Rails credentials.
- Created a new .env.example file to provide a template for environment variable configuration, including S3 and Rails secret key settings.
- Expanded the README to include detailed instructions on setting up environment variables, enhancing clarity for new users.
…ble management

- Added dotenv-rails (3.1.7) to Gemfile.lock to enhance environment variable handling in the application.
- Updated dependencies to reflect the inclusion of dotenv-rails, ensuring proper management of sensitive data.
- Introduced a new audio player component in the shared views, enhancing the episode show page with a custom audio player.
- Created a Stimulus controller for managing audio playback, including play/pause functionality, volume control, and progress tracking.
- Updated the episode show view to utilize the new audio player, replacing the default HTML audio element for improved user experience.
- Added loading and error states to the audio player for better feedback during audio loading processes.
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.

3 participants