The auto ad is added to the city page and the weather art page. It improves user experience by showing relevant ads to the user. This change should not affect performance as it only modifies the view.
- Add auto ad in city page and weather art page.
- Refactor shadow effects to improve user experience.
- No side effects or any other consequences.
- 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.
- Renamed `app/views/cities/_map.html.erb` to
`app/views/shared/_map.html.erb`
- Updated references to the map partial in `cities/show.html.erb` and
`weather_arts/show.html.erb`
- Adjusted the layout in `cities/show.html.erb` and
`weather_arts/show.html.erb` for visual consistency.
This refactoring improves code reusability and maintainability by
centralizing the map component. It also improves the visual
presentation of the application.
This commit updates the map functionality to ensure the weather art's
display is correctly rendered. This includes modifications to the
weather art display. It ensures the correct image is shown and improves
the overall application experience.
The logging level of the batch job worker has been changed from info to debug. The change affects how the batch job worker outputs information about the cities it is processing.
- Original behavior: The batch job worker logs cities' information at the info level.
- New behavior: The batch job worker logs cities' information at the debug level.
The motivation behind this change is to reduce the noise in the logs. The new behavior will only log cities' information that is relevant for debugging purposes.
- 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.
- Comment out marker click listener to fix a bug
- Update _map.html.erb to handle null values in the city
- Improve error handling
This commit addresses a bug where clicking the map marker
caused unexpected behavior. The changes involve commenting out
the click listener to fix the issue, and updating the view
template to handle potential null values in the city object to
prevent unexpected behavior.
- Replace OpenLayers with Mapbox GL for map rendering.
- Update CSS for map styling and control visibility.
- Integrate weather art into map popups.
- Add Mapbox token to credentials.yml.enc
This commit replaces the existing OpenLayers map implementation
with Mapbox GL. It also adjusts the styling and adds a
weather art display to the map popup, which enhances the
user experience. The necessary changes include modifying
stylesheets, JavaScript controllers, view templates, and
updating the credentials file. The motivation is to enhance
map rendering performance and user experience.
- 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.
- Implement MapController for displaying city maps
- Add map rendering in the city show view
- Include weather arts in the city show controller
- Update asset pipeline to include Leaflet CSS and JS
This commit introduces a map feature that allows users to view
geographical information related to cities. The map is integrated
with weather arts data, enhancing the overall functionality of
the city show page.
- Introduce a new partial for displaying weather statistics in
a consistent card format.
- Refactor the city show page to utilize the new statistics
card partial, simplifying the code structure.
- Update layout and styling for improved UX and maintainability.
These changes enhance the maintainability of the codebase by
promoting reuse of the statistics card component and improving
the overall presentation of weather data for cities.
- 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.
- Replace local timezone display with UTC in the weather
display components
- Adjust time formatting in both city and weather art views
This change standardizes the time format across the application,
making it clear that the displayed times are in UTC, aiding user
understanding and consistency in time representation.
- Update load time display to show the rounded value instead of the
raw measurement.
- This change improves the readability of the load time for end users
by providing a more user-friendly format.
The adjustment enhances the user experience by presenting the load time
in a cleaner and more comprehensible manner.
- Simplified page views and visitors display in footer
- Improved readability by using labels and abbreviations
- Updated Tailwind CSS configuration for better font fallback
These changes enhance the user interface in the footer by making the
presentation of page views and visitors more concise and visually
appealing. The update also ensures a better font fallback
experience across different platforms.
- Changed includes for WeatherArt to optimize query
- Removed redundant includes of country in WeatherArt
- Simplified region fetching by directly ordering
These modifications improve the efficiency of the queries
by reducing unnecessary joins and utilizing ActiveRecord’s
query capabilities more effectively. The code change does not
affect the overall functionality but improves maintainability.
- Include associated city and image attachment in popular,
random, latest, and featured arts queries to enhance data
accessibility and performance.
- This modification reduces N+1 query issues by eager-loading
associations, leading to improved query performance when
accessing related data.
- Introduced PageLoadTimeController to measure and display
page load times.
- Moved the footer content into a partial for better code
organization.
- Added 'bullet' gem for performance monitoring.
This commit enhances the application by providing useful
information about load time directly in the UI and
refactoring the layout code for maintainability.
- Use `preview_image(:large).processed` instead of `image`
for displaying featured arts.
This change improves the performance of the homepage by
displaying a processed preview image instead of the original,
potentially large, image. This reduces the initial load time
and improves user experience.
- Update image tag to display the processed preview image
- Ensures better performance and visual consistency
This change improves the rendering of art images by using
processed versions, which may reduce load time and improve
appearance on the front end.
- 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.
- Change the order of displayed city attributes in logs
- Adjust tabulation for clearer output
This commit modifies the logging format used in the
BatchGenerateWeatherArtsWorker class. The attribute order for
city information in the log output has been changed to ensure
a more intuitive display, with regions now appearing before
countries and states. This will enhance readability during
logging without altering any functionality.
- Implement daily generation limit for weather arts
- Improve city selection by prioritizing active cities
- Introduce logging for city generation start time and list
This update enhances the efficiency of the `BatchGenerateWeatherArtsWorker`. It ensures that the system respects a daily limit on the number of generated images and improves how cities are selected for processing by prioritizing active cities while also conditionally selecting others if slots remain. Additionally, the added logging provides better insights into the generation process.
- 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.
- Add padding and flex layout to the sign out button
- Wrap the icon and text in a div for better structure
These changes update the sign out button in the navbar for improved
accessibility and aesthetics, aligning it better with the overall UI
style.
- Adjust main navigation layout for better spacing
- Improve mobile menu accessibility and usability
- Introduce a separate user menu partial for cleaner structure
- Update button styles and sizes for consistency
These changes aim to enhance the user experience by ensuring that the navbar is visually appealing and functional across different screen sizes, making navigation easier.
- 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.
- Introduce filtering of cities by selected country
- Retrieve current country using friendly find method
- Apply city filtering if country is provided in parameters
This change allows users to efficiently filter cities based on the
selected country, providing a more tailored experience and
encouraging better navigation through the list of cities.
- Update buttons to include data attribute for Turbo frames
- Ensure proper behavior of navigation with turbo-enabled requests
This change enhances the functionality of the buttons by allowing them
to interact with Turbo frames, improving performance and user
experience when transitioning between different views on the application.
- Implement loading state in the search input with spinner.
- Optimize the search request to handle pending requests and cancels.
- Add dynamic response handling for Turbo frames to load search results.
- Create a new partial for city search results.
- Update the cities controller to support Turbo stream responses.
These enhancements improve user experience during searches by showing a loading
spinner and addressing potential issues with overlapping requests, ensuring
that the application remains responsive and functional when fetching city
search results.
- 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 requirements for clearer and brighter images
- Specify maintenance of brightness even in overcast conditions
- Include enhancements for sunny day imagery
- Revise output prompt to remove unnecessary prefix and suffix
These changes improve the clarity and effectiveness of prompts
used in AI-generated imagery. The additional specifications help
guide the AI in producing visually appealing and contextually
relevant images for various weather conditions.
- Refactor prompt generation to separate location
description functionality
- Update user prompt generation for DALL-E 3
- Improve AI service's response handling
This change enhances the AiService by creating a more
modular approach to generating prompts. The introduction
of a `generate_location_desc` method improves the
detail and context provided in the generated prompts.
Furthermore, the `ask_ai` method centralizes AI request
logic, allowing for cleaner and more organized code.
These adjustments should improve the overall robustness
and readability of the prompt generation process.
- Include state, country, and region in the DALL-E prompt
- Enhance context for the generated weather scene
This change improves the specificity of the prompts generated
for the AI, providing more contextual information such as
state, country, and region alongside the city name. This
enhancement can lead to more accurate and relevant outputs
from the DALL-E 3 model for weather scenes.
- Clean up trailing whitespace in app/admin/state.rb
- Clean up trailing whitespace in app/admin/subregions.rb
- Clean up trailing whitespace in app/admin/users.rb
- Adjust formatting in cities_controller.rb for consistency
These changes improve code readability and maintainability by
removing unnecessary whitespace. It is a small clean-up that prepares
files for better version control parsing and reduces the diff clutter.
- Change generation interval from 24 hours to 36 hours
This change provides more flexibility in scheduling weather arts generation, which could lead to better resource management or accommodate changes in data availability.
- Update menu labels for cities, countries, and regions
- Introduce new entities for states and subregions in Admin Panel
- Implement admin authentication for weather art generation
- Modify application controller to check for admin user
- Refactor view to display admin panel based on user permissions
- Update routes to include weather art generation action
These changes enhance the admin interface for better management of cities
and related entities. The new admin checks ensure that only authorized users
can generate weather art, improving security and functionality.
- Implemented a new admin panel that allows administrators to view
statistics and manage weather art. The panel includes:
- A card displaying total images and today's images
- Buttons to generate new art and edit the city
- Added `admin?` helper method to check if the current user is an
administrator.
- Updated database configuration to use safer credentials lookup
method `dig` for development database URL instead of the
previous method, improving reliability in accessing nested
credentials.
- Updated confirmation, password, unlock, and session views to use a
card-based layout for improved visual appeal.
- Added responsive design features to ensure compatibility across devices.
- Enhanced usability by providing clear placeholders in form fields.
These changes improve the user experience during account recovery and
management processes. The design promotes a modern interface while
maintaining functionality.
- 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.