Skip to content

Commit

Permalink
💄 Gloss: Update Comments
Browse files Browse the repository at this point in the history
Update RNIModalManager.swift
  • Loading branch information
dominicstop committed Apr 7, 2023
1 parent ecf960a commit 50eee67
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions ios/src_library/React Native/RNIModal/RNIModalManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,42 @@ public let RNIModalManagerShared = RNIModalManager.sharedInstance;
/// * 2 - If a modal presented/dismissed w/o notifying `RNIModalManager`,
/// the `modalIndex` will be stale.
///
/// * 3 - If a modal was about to be blurred (i.e. "will blur"), but was
/// cancelled halfway (i.e. "did blur" not invoked), and the modal regained
/// focus again (i.e. invoking "will focus" + "did focus").
///
/// * 4 - Invoking "will blur", or "will focus" but not invoking the invoking
/// the corresponding "did blur", and "did focus" methods.
///
/// * When a modal is hidden, it will trigger a "focus" event for the new
/// topmost modal; subsequently, when a modal is shown, it will trigger a
/// "blur" event for the previous topmost modal.
///
/// * This assumes that the "modal manager" can only be notified of a pair of
/// "focus", or "blur" at a given time, per window instance...
///
/// * E.g. "will focus" -> "did focus", "will blur" -> "did blur".
///
/// * However, there might be an instance where multiple modals may be
/// hidden at the same time...
///
/// * E.g. "will blur 1", "will blur 2", "did blur 1", "did blur 2", etc.
///
/// * When multiple "blur" events are firing, the modal with the lowest
/// index should take priority.
///
/// * Subsequently, when multiple "focus" events are firing, the modal with
/// the highest modal index should take priority.
///
/// * Additionally, when a "blur", or "focus" event is firing at the same
/// time...
///
/// * E.g. "will blur 1", "will focus 2", "did blur 1", "did focus 2", etc.
///
/// * The "focus" event should take priority, (assuming that the "focus"
/// event was fired for the topmost modal).
///
///
/// `Note:2023-03-30-19-36-33` - Archived/Old
///
/// * This assumes that the app is using a single window, and all the modals are
Expand Down

0 comments on commit 50eee67

Please sign in to comment.