elm_ctxpopup, elm_popup and elm_notify are basically the same kind of widget: an inline popup with a container API. We need one instead of 3. It should be using the pack interface and we may provide a convenience interface to automatically create content with icon, text and data (Should be shared with toolbar, T5327).
Description
Status | Assigned | Task | ||
---|---|---|---|---|
Open | None | T7142 efl 2.0 considerations | ||
Open | cedric | T5301 Make EFL easier to use by improving its interface | ||
Open | felipealmeida | T5567 Simple factories (with or without model) | ||
Duplicate | singh.amitesh | T5363 Cleanup elm_widget.eo | ||
Resolved | cedric | T6360 EO: Item and Item_List API's | ||
Resolved | thiepha | T5326 Refactor ctxpopup, popup and notify |
I think Thiep, Taehyub, and Jinyong need to talk together for defining the feature scope of this work.
I hope there will be good hierarchy like -
- Basic Popup Class : has the basic features of notify, popup, and ctxpopup
- Ctx Extension Class : inherits #1, and has some tirivial features of ctxpopup
- Popup Extension Class : inherits #1. and has some trivial features of popup
Let's have discussion on this task. Thiep ? Could you lead this ?
Sorry for late reply @woohyun. I have small discussion with Taehyub before about this. We will have another discussion next week which talks about detail feature and implementation of popup interface.
The below interfaces are necessary for common popup (basic) and the ctx popup and popup.
It may not be the full list but these APIs should be supported by popups.
- Common interfaces:
//content efl_container_content_set/get/content_unset //item efl_ui_popup_item_add/prepend/clear efl_ui_menu_selected/first/last_item/items_get //autohide efl_ui_popup_autohide_set/get //geometry (return geometry of popup area, not include background) efl_gfx_geometry_get //event allowance (whether events should be passed to lower layer by a click outside.) efl_ui_popup_allow_events_set/get //focus: popup should not get focus: ex: entry has selection and popup is shown //accessibility: implement atspi //events events { timeout; [[Called when popup timed out]] focused; [[Called when popup got focus]] unfocused; [[Called when popup lost focus]] dismissed; [[Called when popup was dismissed]] }
- Ctxpopup specific:
//orientation (up/down/right/left/none) efl_orientation_get/set
- Popup specific:
//title, button (action) efl_ui_popup_title_set efl_ui_popup_action_set //align efl_gfx_align_set/get //timeout: usage: toast popup efl_ui_popup_timeout_set/get
As thiep said at the head of his comment,
above properties and mothods are just something for existing features of popup / notify / ctxpopup.
We need to do ideation what are needed more for better supports of them.
Let's make a list of items what can be considered more after having face to face meeting.
Dear @woohyun ,
@thiepha , @herb and I discussed the properties of future popup classes as follows.
Properties
1.allow_events set / get
2.dismiss
3.event_bg set (image)
4.list properties (item append / item prepend / clear)
5.scrollable property for content
6.orientation property
7.anchor property
8.text set / get
9.title set / get
10.buttons set
11.timeout set / get
12.direction set / get
13.title icon set / get
Class Hierarchy with Properties (the name of each class can be changed)
Common Popup (1, 2, 3) | ||||||||
1.Scrollable Popup (5, 8) | 2.List Popup (4) | |||||||
1.1.Toast Popup (11, 12) | 1.2.Alert Popup (9, 10, 12, 13) | 1.3.Contextual Popup (6, 7) | 2.1.List Alert Popup (9, 10, 12, 13) | 2.2.List Contextual Popup (6, 7) | ||||
As I understand there are 2 separate use cases: single content (scrollable or not), list content. I think your class hierarchy makes sense.
@herb is implementing Efl.Ui.Popup.Alert.Scroll by D5123.
- Efl.Ui.Popup.Alert.Scroll has the following properties, scroll_enable and scroll_disable for vertical and horizontal directions.
@herb is implementing Efl.Ui.Popup.Alert.Text by D5124.
- Efl.Ui.Popup.Alert.Text has the following properties, scroll_enable and scroll_disable for vertical direction.
@Blackmole is implementing Efl.Ui.Popup.Anchor by D5126
- Efl.Ui.Popup.Anchor has the following property, anchor_set, anchor_get, align_priority_set and align_priority_get.
- Efl.Ui.Popup.Anchor has one sub class, List.
<Meeting Summary>
Class Hierarchy
- Prototype using future and Compare future and current event callbacks for Efl.Ui.Popup.Alert 's buttons.
- The term "bg" is not used for the event blocker area. Instead of that, "base", "backdrop", "event_blocker" can be used.
- Anchor has priority for align property and align option (e.g. LEFT, RIGHT, TOP, BOTTOM) is chosen based on the following principle. a. Entire popup area should be displayed on the screen. b. If entire popup area is not displayed on the screen, then anchor object should not be hidden by popup.
- Efl.Ui.Popup has "timeout" property.
- Tooltip in the new interface inherits Efl.Ui.Popup.Anchor (The legacy tooltip is separately preserved.)
Base popup classes have been merged.
dcb7093c4c efl_ui_popup_alert: Remove expandable property for now
c752d8fe6b efl_ui_popup: Make backwall efl part object of Efl.Ui.Popup
91df6723c9 efl_ui_popup: Rename bg_set with backwall_set
8301e66d87 efl_ui_popup: add timeout signal
27c0c90423 efl_ui_popup_alert: Define Clicked_Event structure
a44e8cec39 efl_ui_popup: Replace group_add/del with constructor/destructor
b85cebdb96 efl_ui_popup: Code refactoring to replace legacy APIs
0928335fbc efl_ui_popup: remove parent_window_get method
2b2bc50e8b efl_ui_popup: replace title_set to efl_text_set with efl_part
8d315ce7aa efl_ui_popup: add timeout property
c8c7ac8aae efl_ui_popup_anchor: add Efl.Ui.Popup.Anchor class
2e9042fae1 efl_ui_popup: remove efl_ui_popup_position_set
3dccf133bb efl_ui_popup_alert_text: add Efl.Ui.Popup.Alert.Text Class
f22d40b1e6 efl_ui_popup_alert_scroll: add Efl.Ui.Popup.Alert.Scroll class
d3a14d08b0 efl_ui_popup_alert: add Efl.Ui.Popup.Alert class
0005b3105e efl_ui_popup: add align and position properties
bccd97bd62 efl_ui_popup: add bg_set and bg_repeat_events_set/get API
996a975506 efl_ui_popup: add Efl.Ui.Popup class
So called "list popup" (basically ctx menu) is still missing because some changes on model are still pending. Ping @cedric.
This is done now. Popup classes are stable and it's pretty trivial to just throw a list in as popup content.