- Introduced `TranslatableName` module to allow for
localized names for `Country` and `Region` models.
- Updated views to display `localized_name` instead of
`name` for improved internationalization.
- Refactored JSON serialization for `translations` attribute.
- Enhanced localization support by adding new languages:
Japanese and Korean, with updated locale files.
- Removed outdated English and Chinese locales for countries
and regions to clean up the codebase.
- Implement locale extraction and fallback mechanism
- Add translation files for English and Chinese
- Update views to use translated strings for various UI elements
This commit introduces support for multiple languages in the application, enhancing accessibility for users. It includes a fallback mechanism for locales and updates to the user interface to display translated content.
- Display the latest weather art on the cities index page.
- Update the weather art preview image size to be big.
- Improve image display by using webp format.
- Adjust the daily and per-run generation limits.
These changes enhance the user experience by providing more
up-to-date and visually appealing content, while also controlling
the resource usage during image generation.
- Added `share_controller.js` to handle sharing logic.
- Created `_share_social.html.erb` partial for social sharing buttons.
- Integrated share buttons into city and weather art show pages.
- Added sharer.js dependency.
This feature allows users to share city and weather art pages on
various social media platforms such as Facebook, Twitter, LinkedIn,
Pinterest, Telegram, and WhatsApp, increasing content visibility.
- Added state association to City model
- Modified City view to display state information
This change includes proper input validation and error handling.
Added city state information to views and models to improve data accuracy and user experience.
The commit fixes issues in the `Country` model to properly handle
timezones when it's a string. The change processes the content and
parses it as JSON data, and fixes an issue with JSON format.
- The `format_timezones` method now attempts to parse and reformat
timezones to prevent potential JSON parsing errors.
- If the conversion to JSON fails, logs the error.
- The code ensures data integrity
by parsing and reformatting the JSON for timezone data to solve a
bug.
</commit_message>
</commit_message>
</commit_message>
This ensures the data is correctly formatted for easier handling
and prevents potential runtime errors when reading timezone data.
</commit_message>
- Updated timezone parsing to handle JSON format.
- Modified how timezones are fetched in multiple models.
- Added a migration to convert existing timezones data.
- Modified the country model to format timezones.
This commit fixes an issue where the timezone data was not
being correctly parsed, leading to potential errors in time
calculations. The changes ensure the application correctly
handles and displays timezone information, improving the
accuracy of time-related features.
- Changed `timezones` attribute from text to JSONB in `Country`.
- Updated related model methods to handle JSONB data.
- Added a migration to convert existing timezone data.
- Used safe navigation operators to prevent errors.
This change improves the storage and management of timezone
information by using the JSONB data type. It includes data
migration to handle existing timezone data.
- Add formatted_current_time method to City model.
- Modify BatchGenerateWeatherArtsWorker to check local time.
- Update Sidekiq scheduler to run every hour.
This commit improves the weather art generation by considering
local time for image generation and increasing the frequency
of batch processing for testing purposes. The new method
provides formatted time information for each city. This change
ensures that images are generated during daylight hours.
- Modified the formatted_time method to use 'self' when accessing the city attribute
- This change fixes a bug where the city attribute was not being accessed correctly, ensuring proper timezone information retrieval.
- Replaced Leaflet with OpenLayers for improved map rendering
- Added OpenLayers CSS and removed Leaflet CSS
- Updated map controller to use OpenLayers API
- Added marker icon in public directory
- Added scopes and associations for weather art in City model
This change migrates the map display from Leaflet to
OpenLayers, providing better performance and more features.
It also introduces new model associations for weather arts,
allowing to sort cities by latest weather updates.
- Introduce a new method `formatted_time` in the `WeatherArt` model
- Update various views to use this new method for date and time display
- Support formatting in local time zones or UTC
This update enhances the time representation for weather data, ensuring
that displayed times can reflect the user's local timezone or remain
fixed at UTC. This improves the usability of the application for
users in different regions.
- Update links in cities index to include country emoji
- Modify display in cities show view to use emoji and country name
- Clean up random scope method in weather_art model for consistency
These changes enhance the user interface presentation by making
country names visually enriched with emojis, improving the overall
user experience with clearer visual cues.
- Update to include a new 'random' scope in WeatherArt model.
- Modify HomeController to fetch random and popular arts along with latest arts.
- Refactor index.html.erb to utilize a partial for rendering arts.
This update improves the display of weather art by adding a new
random selection of arts alongside popular ones, increasing user
engagement and variety. The code structure is also cleaner due
to the use of a partial view for rendering arts, promoting
the DRY principle.
- Remove deprecated `image_with_watermark` attachment.
- Introduce `webp_image`, `preview_image`, and `watermarked_image` methods in `WeatherArt` model for optimized image formats.
- Update views to use new image variants, including webp and previews, improving loading times and visual quality.
- Ensure images are processed with relevant attributes such as quality and dimensions for better performance and user experience.
These changes enhance the image handling capabilities of the application by ensuring images are served in a more efficient format (WebP) and with improved resizing options, leading to better performance overall.
- Change `limit:` to `limit =` in the scopes for
`latest` and `by_popularity`.
- This allows for a default value of 100 to be used
if no argument is provided, making the code more
user-friendly and consistent.
This refactor does not alter the behavior of the
existing functionality but streamlines the syntax.
- Change `by_popularity` method in `City` model to use `start_time` for filtering views.
- Update `by_popularity` in `WeatherArt` model to limit results and incorporate the correct popularity calculation.
- Adjust `HomeController` to define `@popular_shuffle_arts` and `@latest_arts` with appropriate scopes.
These changes improve the accuracy of popularity retrieval for both cities and weather arts, simplifying the logic in the controller and leveraging updated model methods for performance.
- Implement search_by_name scope in City model
- Add SearchController for handling search input
- Include _search_city partial in cities index view
- Update cities_controller to filter cities based on search query
This commit introduces a new feature that allows users to search for
cities by name using an input field. The search is implemented as a
scope in the City model, and it is integrated into the existing
CitiesController. A dedicated SearchController manages the input
submission with a debouncing mechanism for better performance. The
search field is rendered in the cities index view, enhancing user
interactivity and experience.
- Implement new scope in City model to fetch popular cities
- Query modified to consider different time periods: today, week, month, and year
- Update Ahoy Dashboard to show top cities for each time period
This change enhances the dashboard, providing insights into city popularity over varying durations, facilitating better data analysis.
- Change 'belongs_to :country' association to be optional
- Change 'belongs_to :state' association to be optional
This refactoring allows a City record to exist without having
an associated Country or State, thus increasing the flexibility
of the data model for various use cases.
- Add confirmable and lockable modules to user model
- Update error messages display with improved UI
- Modify navbar links for better accessibility and styling
- Add unique indexes for confirmation and unlock tokens in migration
These changes improve user management and user experience by
adding features for account activation and security, along
with styling enhancements for the authentication views.
- Integrate Devise for user authentication
- Create User model and necessary views
- Implement email confirmation and password reset functionality
- Add routing for user sign-up and login
- Customize error messages display
This commit initiates user authentication in the application
using the Devise gem. It includes user registration, login,
password reset, and email confirmation features. Additionally,
the necessary views and mailer templates are included to
support these functionalities. This enhances the security
and usability of the application by allowing users to create
accounts and manage their passwords effectively.
- Update view_count method to accept different time periods
- Modify ahoy_dashboard to display views per day, week, and year
These changes provide a more granular view of city visits, allowing for
better analytics and insights on user engagement over time.
- Add display of activated and non-activated city counts
- Introduce a new scope for inactive cities in City model
- Update Ahoy Dashboard to show the total count of both active and inactive cities
This update provides better insights into city activation status within the
Ahoy Dashboard. It introduces a new function in the City model and updates
the dashboard to reflect these statistics, assisting in better monitoring
of city status.
- Integrate PhotoSwipe library for enhanced image viewing
- Create PhotoSwipeLightBoxController to manage images
- Register lightbox controller in Stimulus framework
- Update views to include lightbox functionality
- Modify styles to accommodate new design elements
This commit introduces a new way for users to view images with
PhotoSwipe, improving the interactivity of the photo gallery. It
also includes adjustments to the layout and styles for better
presentation and user experience.
- Include the image_processing gem to handle image manipulation
- Create a background worker for adding watermarks to weather art images
- Update WeatherArt model to attach watermark images
- Add a new watermark image asset
This commit enhances the WeatherArt feature by allowing images to
have watermarks added asynchronously, improving the visual
presentation of the art. It ensures sufficient image dimensions
before processing and includes error handling for the worker.
- Update localized_name method to provide a default value for
missing translations
- Modify timezone display in city show view to show a message
when the timezone is undefined
These changes improve user experience by ensuring that the city
localization falls back to the city name itself if a translation
is not found, and they handle potentially missing timezone data
more gracefully.
- Simplify query for most popular inactive cities in City model
- Minor layout changes in Admin Dashboards for Ahoy and Sidekiq tasks
This refactoring improves code organization, reducing complexity in the City model and making it easier to read. Additionally, the Admin dashboard layouts have been simplified for a better user experience.
- Introduce a new admin dashboard for viewing Ahoy statistics.
- Display total visits, event counts, and unique visitors.
- List most popular and least popular active cities with their visit counts.
- Add a panel for recent events.
- Modify existing dashboard to include a section for inactive cities.
This commit introduces a comprehensive dashboard that helps
admin users monitor the traffic and engagement statistics of
various cities. The changes include functionality to show
active and inactive cities based on their popularity,
allowing for better insights into user engagement across
the application.
- Change query conditions in City model to use the
`properties::jsonb` syntax for compatibility.
- Update WeatherArt model's event counting to reflect
the same JSONB handling for consistency across models.
These changes ensure that the queries correctly access the
JSONB fields in the database, which enhances robustness
when handling different database adapters like Postgres
or SQLite. This fixes potential issues with ahoy events
not being counted accurately due to incorrect property access.
- Change single quotes to double quotes for adapter name check
This change ensures consistent usage of double quotes in the
conditional check for the SQLite adapter. It does not affect
any functionality but improves code readability.
- Introduce new panel in the admin dashboard for displaying
the least popular active cities.
- Implement a database scope `least_popular_active` to
retrieve cities based on their view counts.
- Ensure compatibility with both SQLite and PostgreSQL
for fetching city view data.
This addition enhances the admin dashboard by allowing
administrators to easily identify and manage cities that
are receiving less user interaction, thus aiding in strategic
planning for engagement and promotion.
- Removed unnecessary leading and trailing blank lines in several
ActiveAdmin register files.
- Reformatted string delimiters for consistency, changing single quotes
to double quotes in tracking events in the Cities and WeatherArts
controllers.
- Ensured proper spacing in array definitions across several
models, including Ahoy::Event and Ahoy::Visit.
These changes improve code readability and maintain consistency
throughout the codebase by ensuring uniform use of quotes and
removing excess whitespace.
- Integrate Ahoy gem for tracking user events and visits
- Create models for Ahoy events and visits
- Implement admin interfaces for managing events and visits
- Add background job for cleaning up old analytics data
- Update application controller and other relevant controllers to track specific actions
This commit implements a comprehensive event tracking system that logs user interactions
within the application. Additionally, it includes mechanisms for managing and
cleaning historical visit and event data, ensuring efficient data handling.
- Introduce a new filter for selecting cities by country in the
ActiveAdmin interface.
- Update the ransackable attributes to include country_id for
searchable functionality.
This change enhances the Admin UI by allowing easier access to
city data based on country, improving the user experience for
administrators.
- Implement caching methods for last weather fetch and image generation
- Adjust sleep duration in BatchGenerateWeatherArtsWorker from 10 seconds to 3 seconds
- Remove unused fields `last_weather_fetch` and `last_image_generation` from the cities table
- Add index on the weather_arts table for optimized querying
This refactor improves data retrieval performance for weather data
associated with cities. Caching reduces database load while the
worker modification allows for faster iterations in generating
weather arts without significantly impacting performance.
- Introduce ArtsController with index action
- Create index view for displaying weather arts
- Implement Kaminari for pagination functionality
- Add necessary routes for accessing arts
- Update Gemfile to include Kaminari gem
- Create views for pagination controls
This implementation enhances the Weather Arts Gallery, allowing users to view and navigate through a collection of AI-generated weather arts easily. Pagination controls have been added to improve usability.
- Add slug column to weather_arts for friendly URLs.
- Update weather arts retrieval in the controller to use slug.
- Implement region and country filtering in cities index view.
- Optimize city queries with scopes for active status and region/country.
- Improve UI layout and design for the cities index page.
These changes allow better user experience by enabling cleaner URLs for weather arts and facilitating efficient filtering of cities based on selected regions and countries.
- Implement Country and Region models
- Establish relationships between City, Country, and Region
- Update ActiveAdmin setup for managing countries and regions
- Add localization support for cities and countries in multiple languages
- Create necessary migrations to support the new schema
This update allows for better categorization of cities under their respective countries and regions, enhancing geographical structure and support for multilingual features.
- Standardize string quotes in various files for consistency.
- Remove commented-out tests from cities and weather_arts controllers to improve readability.
- Clean up admin_users and weather_arts fixture files by commenting out unused entries instead of removing them.
These changes are aimed at enhancing code readability and maintainability, ensuring that code adheres to style guidelines without removing useful comments for future reference.
- Import Playfair Display and Raleway fonts for better typography
- Add a method to `City` model for fetching the latest weather art
- Revamp city index and show pages for improved layout and usability
- Update styles in the layout and main pages to enhance user experience
These changes promote visual consistency and enhance user interaction within the platform, providing a more engaging experience.
- Integrate 'friendly_id' gem for sluggable functionality in City model
- Create ActiveAdmin resources for managing cities and weather arts
- Implement controller logic for cities
- Add database migrations for cities and weather arts creation
- Seed database with sample data for testing
- Create initial test cases for controllers and models
This commit enhances the application's URL handling by allowing friendly URLs for cities and weather arts. The addition of ActiveAdmin resources facilitates easier management through a web interface.