Page MenuHomePhabricator

Refactor ctxpopup, popup and notify
Closed, ResolvedPublic


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).

Related Objects

cedric created this task.Mar 30 2017, 2:57 AM
cedric updated the task description. (Show Details)Mar 30 2017, 3:07 AM
cedric updated the task description. (Show Details)

This may depend on T5328.

thiepha claimed this task.Apr 11 2017, 6:22 PM
woohyun added a comment.EditedMay 15 2017, 12:12 AM

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 -

  1. Basic Popup Class : has the basic features of notify, popup, and ctxpopup
  2. Ctx Extension Class : inherits #1, and has some tirivial features of ctxpopup
  3. 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.

  1. Common interfaces:



//geometry (return geometry of popup area, not include background)

//event allowance (whether events should be passed to lower layer by a click outside.)

//focus: popup should not get focus: ex: entry has selection and popup is shown

//accessibility: implement atspi

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]]
  1. Ctxpopup specific:
//orientation (up/down/right/left/none)
  1. Popup specific:
//title, button (action)


//timeout: usage: toast popup

@thiepha @Blackmole @herb

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.

cedric raised the priority of this task from TODO to High.Jul 10 2017, 3:39 PM

@thiepha @jinyong @herb

Could you update future hierarchay of the popup related classes ?
I recommend that the hierarchy description also includes property + method together.

Jaehyun_Cho added a comment.EditedJul 17 2017, 7:45 PM

Dear @woohyun ,

@thiepha , @herb and I discussed the properties of future popup classes as follows.

1.allow_events set / get
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)

Dear @cedric , @jpeg

I appreciate if you comment on the above properties and class hierarchy :)

Thank you

jpeg added a comment.Jul 23 2017, 10:50 PM

As I understand there are 2 separate use cases: single content (scrollable or not), list content. I think your class hierarchy makes sense.

jpeg added a comment.Aug 9 2017, 10:57 PM

OK so ctxpopup is legacy only. Thanks.

Jaehyun_Cho updated the task description. (Show Details)Aug 21 2017, 6:11 PM
Jaehyun_Cho updated the task description. (Show Details)

@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.
Jaehyun_Cho updated the task description. (Show Details)Aug 25 2017, 12:47 AM
jpeg added a comment.Aug 30 2017, 10:28 PM

Please drop all popup patches that are not related to this latest design.

herb added a comment.Aug 30 2017, 10:48 PM

I will remove the patches which are not related to the latest design.

Jaehyun_Cho added a comment.EditedSep 7 2017, 12:26 AM

<Meeting Summary>

Class Hierarchy

  1. Prototype using future and Compare future and current event callbacks for Efl.Ui.Popup.Alert 's buttons.
  1. The term "bg" is not used for the event blocker area. Instead of that, "base", "backdrop", "event_blocker" can be used.
  1. 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.
  1. Efl.Ui.Popup has "timeout" property.
  1. Tooltip in the new interface inherits Efl.Ui.Popup.Anchor (The legacy tooltip is separately preserved.)
jpeg added a comment.Dec 11 2017, 9:50 PM

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

@jpeg @Jaehyun_Cho

Could we close this task ? Or, are there something remained to do ?

jpeg added a comment.Jan 17 2018, 12:54 AM

So called "list popup" (basically ctx menu) is still missing because some changes on model are still pending. Ping @cedric.

zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 6:54 AM
zmike edited projects, added efl: widgets; removed Restricted Project.Jun 11 2018, 8:16 AM
zmike added a subscriber: zmike.

A #Goal ticket should not be set to a milestone.

zmike closed this task as Resolved.Sep 3 2019, 9:50 AM

This is done now. Popup classes are stable and it's pretty trivial to just throw a list in as popup content.