-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small fixes in management_places.html files #8041
Conversation
WalkthroughThe pull request introduces a comprehensive redesign of the management places HTML template. The changes focus on consolidating multiple stylesheets into a single Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
core/src/main/resources/templates/core/management_places.html (1)
Line range hint
479-481
: Security: Move API key to environment configuration.The Google Maps API key is hardcoded in the template. This poses a security risk as the key could be misused.
-<script defer - src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB3xs7Kczo46LFcQRFKPMdrE0lU4qsR_S4&callback=initMap"> +<script defer + th:src="@{'https://maps.googleapis.com/maps/api/js?key=' + ${@environment.getProperty('google.maps.api.key')} + '&callback=initMap'}">
🧹 Nitpick comments (2)
core/src/main/resources/templates/core/management_places.html (2)
245-259
: Enhance accessibility for nested tables.The nested table for opening hours might cause issues with screen readers. Consider using a more semantic structure like definition lists or structured divs with ARIA attributes.
-<td colspan="3"> - <div th:if="${!place.getOpeningHoursList().isEmpty()}"> - <table class="table table-borderless m-0 table-child"> +<td colspan="3"> + <div th:if="${!place.getOpeningHoursList().isEmpty()}" role="region" aria-label="Opening Hours"> + <dl class="hours-list"> <th:block th:each="openingHours : ${place.getOpeningHoursList()}"> - <tr> - <td th:text="${openingHours.weekDay}"></td> - <td th:text="${openingHours.openTime}"></td> - <td th:text="${openingHours.closeTime}"></td> - </tr> + <dt th:text="${openingHours.weekDay}"></dt> + <dd> + <span th:text="${openingHours.openTime}"></span> - + <span th:text="${openingHours.closeTime}"></span> + </dd> </th:block> - </table> + </dl> </div> </td>
407-409
: Consider using semantic button classes.The button class has been changed from
btn-info
tobtn-default
. While this works, using semantic classes that reflect the action's purpose would be more maintainable.-<button class="btn btn-default" id="addDiscount"> +<button class="btn btn-primary" id="addDiscount">
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
core/src/main/resources/templates/core/management_places.html
(5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (1)
core/src/main/resources/templates/core/management_places.html (1)
7-7
: Verify script loading dependencies.The sidebar script is loaded with the
defer
attribute, but it might have dependencies on other scripts that are loaded withoutdefer
. Consider addingdefer
to other non-critical scripts to improve page load performance.Also applies to: 23-23
|
GreenCity PR
Summary Of Changes 🔥
Fixed the display and styles of the table in admin section
Changed
PR Checklist Forms
(to be filled out by PR submitter)
dev
branch.NEED_REVIEW
andREADY_FOR_REVIEW
labels are added.Summary by CodeRabbit
New Features
Style
main.css
Chores