Skip to content
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

Enable dark mode #409

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from
Draft

Enable dark mode #409

wants to merge 34 commits into from

Conversation

Marc-Andrieu
Copy link
Contributor

@Marc-Andrieu Marc-Andrieu commented Jul 7, 2024

The switch in the UI

  • Existence: bottom of sidebar
  • Toggles the theme (and the icon)

Preference

  • System theme as default
  • Remember the pref device-wise (and check it works)

Colors

  • Choose a set of colors to set up a light and a dark theme, that are consistent across the app
  • "Factorize" colors
    • Define one set of colors by theme
    • Replace hardcoded colors with theme-provided colors everywhere

What is done (in the code)

  • admin

    • components
      • admin_button
      • text_editing
      • user_ui
    • pages
      • add_association_page
      • add_loaner_page
      • edit_module_visibility
        • edit_module_visibility
        • modules_expansion_panel
      • edit_page
        • edit_page
        • results
        • search_user
      • main_page
        • association_button
        • association_ui
        • card_ui
        • main_page
    • admin
  • advert

    • components
      • advert_card
      • announcer_bar
      • tag_chip
    • pages
      • admin_page
        • admin_advert_card
        • admin_page
      • detail_page
      • form_page
        • add_edit_advert_page
        • add_rem_announcer_page
        • announcer_card
      • main_page
      • advert
  • amap

    • components
      • order_ui
      • product_ui
    • pages
      • admin_page
        • account_handler
        • adding_user
        • adding_user_container
        • admin_page
        • cash_container
        • delivery_handler
        • delivery_ui
        • product_handler
        • user_cash_ui_layout
        • user_cash_ui
      • delivery_pages
        • add_edit_delivery_cmd_page
        • product_ui_check
      • detail_delivery_page
        • detail_page
        • order_detail_ui
        • product_detail_ui
      • detail_page
      • list_products_page
        • category_page
        • list_products_page
        • list_products
        • page_view_dots
        • product_choice_button
        • product_ui_list
        • web_page_navigation_button
      • main_page
        • collection_slot_selector
        • delivery_section
        • delivery_ui
        • main_page
        • orders_section
      • presentation_page
      • product_pages
    • amap
  • booking

    • calendar
      • appointment_data_source
      • calendar_dialog_button
      • calendar_dialog
      • calendar
    • components
    • pages
      • admin_pages
        • add_edit_manager_page
        • add_edit_room_page
        • admin_entry
        • admin_page
        • admin_scroll_chips
        • admin_shrink_button
      • booking_pages
        • add_edit_booking_page
        • checkbox_entry
      • detail_pages
        • contact_button
        • detail_booking
      • main_page
      • manager_page
        • list_booking
        • manager_page
    • booking
  • centralisation

    • pages
      • liked_card
      • main_page
      • module_card
      • section_list
    • centralisation
  • cinema

    • pages
      • admin_page
        • admin_page
        • admin_session_card
      • detail_page
      • main_page
        • main_page
        • session_card
      • session_pages
        • add_edit_session
        • tmdb_button
    • cinema
  • drawer

    • bottom_bar
    • custom_drawer
    • drawer_template
    • drawer_top_bar
    • email_change_popup
    • fake_page
    • list_module
    • module
    • notification_badge
    • notification_popup
    • quit_dialog
  • event

    • components
      • edit_delete_button
      • event_ui
    • pages
      • admin_page
        • admin_page
        • list_event
      • detail_page
      • event_page
        • add_edit_event_page
        • checkbox_entry
      • main_page
    • event
  • flappybird

    • pages
      • game_page
        • bird
        • game_page
        • pipe_handler
        • pipe
        • score
        • start_screen
      • leaderboard_page
        • leaderboard_item
        • leaderboard_page
    • flappybird_item_chip
    • flappybird_template
  • home

    • day_card
    • day_list
    • days_event
    • home
    • month_bar
  • loan

    • pages
      • admin_page
        • admin_page
        • delay_dialog
        • item_card
        • loan_card
        • loan_history
        • loaners_bar
        • loaners_items
        • on_going_loan
      • detail_pages
        • detail_loan
        • item_card_in_loan
      • item_group_page
      • loan_group_page
        • add_edit_button
        • add_edit_loan_page
        • check_item_card
        • end_date_entry
        • item_bar
        • number_selected_text
        • search_result
        • start_date_entry
      • main_page
    • loan
  • login

    • components
      • animation_provider
      • background_painter
      • login_field
      • page_animation_builder
      • sign_in_up_bar
      • text_from_decoration
    • pages
      • create_account_page
      • forget_page
      • recover_password
      • register_page
      • sign_in_page
    • web
      • left_panel
      • right_panel
      • web_sign_in
    • app_sign_in
    • auth_page
  • others

    • tools/constants
    • loading_page
    • no_internet_page
    • no_module
    • update_page
  • ph

    • components
      • year_bar
    • pages
      • admin_page
        • admin_page
        • admin_ph_card
        • admin_ph_list
      • file_picker
      • form_page
      • main_page
      • past_ph_selection_page
        • past_ph_selection_page
        • ph_card
        • ph_list
      • view_ph
      • ph
    • button
  • phonebook

    • tools
      • constants
      • function
    • components
      • copiabled_text
      • kinds_bar
      • radio_chip
      • text_input_dialog
    • pages
      • admin_page
        • admin_page
        • association_research_bar
        • delete_button
        • editable_association_card
        • edition_button
      • association_creation_page
        • association_creation_page
        • text_entry
      • association_editor_page
        • association_editor_page
        • association_information_editor
        • member_editable_card
      • association_page
        • association_page
        • card_field
        • member_card
        • web_member_card
      • main_page
        • association_card
        • main_page
        • research_bar
      • member_detail_page
        • element_field
        • member_detail_page
        • membership_card
      • membership_editor_page
        • membership_editor_page
        • search_result
    • phonebook
  • purchases

    • pages
      • history_page
        • history_page
        • purchase_card
        • research_bar
      • main_page
        • custom_button
        • main_page
        • ticket_card
      • purchase_page
      • scan_page
        • qr_code_scanner
        • scan_dialog
        • scan_page
        • ticket_card
      • ticket_page
      • user_list_page
    • purchases
  • raffle

    • components
      • blue_btn
      • section_title
    • pages
      • admin_module_page
        • account_handler
        • adding_user_card
        • adding_user_container
        • admin_module_page
        • cash_container
        • confirm_creation
        • tombola_card
        • tombola_handler
      • creation_edit_page
        • creation_edit_page
        • prize_card
        • prize_handler
        • ticket_handler
        • ticket_ui
        • user_cash_ui
        • winning_ticket_card
        • winning_ticket_handler
      • main_page
        • main_page
        • raffle_card
        • ticket_card_background
        • ticket_card
      • pack_ticket_page
      • prize_page
      • raffle_page
        • buy_pack_ticket_card
        • buy_type_ticket_card
        • confirm_payment
        • prize_card
        • prize_dialog
        • raffle_page
    • creation_button_anim
    • raffle
  • recommandation

    • pages
      • add_edit_page
      • information_page
      • main_page
    • widgets
      • recommandation_card_layout
      • recommandation_card
      • recommandation_template
  • settings

    • pages
      • change_pass
        • change_pass
        • password_strength
        • secure_bar
        • test_entry_style
      • edit_user_page
        • edit_user_page
        • picture_button
        • user_field_modifier
      • log_page
        • log_card
        • log_page
        • log_tab
        • notification_tab
      • main_page
        • main_page
        • settings_item
      • modules_page
      • notification_page
    • settings
  • tools

    • builders
      • async_child
      • auto_loader_child
      • waiting_button
    • layouts
      • add_edit_button_layout
      • app_template
      • card_button
      • card_layout
      • column_refresh
      • horizontal_list_review
      • item_chip
      • refresher
    • widgets
      • admin_button
      • align_left_text
      • calendar
      • date_entry
      • dialog
      • image_picker_on_tap
      • loader
      • styled_search_bar
      • text_entry
      • text_with_hyper_link
      • top_bar
  • vote

    • components
      • contender_logo
      • member_card
    • pages
      • admin_page
        • admin_button
        • admin_page
        • contender_card
        • section_bar
        • section_chip
        • section_contender_items
        • vote_bars
        • vote_count
        • voter_chip
        • voters_bar
      • contender_pages
        • add_edit_contender
        • search_result
      • detail_page
      • main_page
        • contender_card
        • list_contender_card
        • list_side_item
        • main_page
        • section_title
        • side_item
        • vote_button
      • section_pages

@codecov-commenter
Copy link

codecov-commenter commented Jul 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 24 lines in your changes missing coverage. Please review.

Project coverage is 53.89%. Comparing base (fb82bbe) to head (0db2fa4).

Files with missing lines Patch % Lines
lib/amap/tools/constants.dart 0.00% 23 Missing ⚠️
lib/tools/functions.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #409      +/-   ##
==========================================
- Coverage   54.18%   53.89%   -0.29%     
==========================================
  Files         169      169              
  Lines        3739     3759      +20     
==========================================
  Hits         2026     2026              
- Misses       1713     1733      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Marc-Andrieu
Copy link
Contributor Author

Closes #408

@Marc-Andrieu Marc-Andrieu changed the title Enable dark mode (#408) Enable dark mode Nov 8, 2024
@Marc-Andrieu Marc-Andrieu added enhancement New feature or request core This PR change the core labels Nov 23, 2024
@Marc-Andrieu
Copy link
Contributor Author

Closes #17 (the very old PR that inspired this one)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core This PR change the core enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants