Repository navigation
feat: add about_dialog control - #44
Merged
Merged
Conversation
Adds AboutDialog (application_name/version/icon/legalese, controls, view: about|licenses, modal, barrier_color, on_dismiss), shown with page.show_dialog like every dialog.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Engine counterpart (renderer): AdamMusa/ruflet-engine#29
Item D3 (P2): adds an
about_dialogcontrol, an about box with the open-source licenses page (App Store / Play compliance).Ruby API
controls/materials/aboutdialog_control.rb(AboutDialogControl). The type isaboutdialogand the wire name isAboutDialog.about_dialog(**props)with the aliasaboutdialog, inmaterial_control_methods.rb,shared_control_forwarders.rbanddsl.rb. It is registered in bothCLASS_MAPs.application_icon application_legalese application_name application_version barrier_color controls data key modal open view visible on_dismiss. It is a dialog, so it takes no COMMON layout keywords.view:"about"(default, decided by the renderer) or"licenses", which opens the licenses page directly.modalandbarrier_colorwere added for parity withalert_dialog; the spec lists neither.on_dismiss→"dismiss". As with every dialog,page.rbuntracks it ondismiss.page.show_dialog(...)/page.close_dialog(...), like every dialog.Material vs Cupertino (engine PR)
AboutDialogandLicensePage.CupertinoAlertDialogwith "View Licenses" / "Close", plus a hand-built Cupertino licenses page (inset-grouped package list, then license text). It uses no Material widgets.Usage
Tests
test/about_dialog_compatibility_test.rbhas 5 runs and 32 assertions:controls, andhas_handler?(:dismiss)view,open,modal)ArgumentErrorshow_dialogopens it, and adismissdispatch calls the handler and untracks the dialogclose_dialogpatchesopen: falseon the controlThe coverage tests are green.
verify_pr.sh(Ruby 4.0.5 + Flutter 3.41.2, against the engine PR):The template conformance counts (R12) are left to the integrator.