Shell unselected tab bar - xamarin.forms

I need to have a shell tab bar with all options unselected.
The default behaviour is to have the first option selected.
An alternative is to have a dummy option and hide it but even this is no possible.

Unfortunately , this should can not be realzied in current version of Shell . It should be the limit of Shell .
Tab class :The Tab class includes the following properties that control tab appearance and behavior:
...
IsChecked
, of type boolean, defines if the item is currently highlighted in the flyout.
...
However this is a read-only property .And there is no other propery can be setted by not showing unselceted status .If want to realzie it , maybe you can have a try with Shell Custom Renderers .

My workaround is:
1. Create a first Tab (I called Home).
2. This first tab shows a Page with a background image, a logo on the center and a Label on the footer with the following message: "Please select an option".
It's not the ideal solution but it was accepted.

Related

How to select tab programmatically?

I need to switch from current tab to another without clicking on the tab itself.
In Clarity's documentation, you can see that the *clrIfActive directive accepts a boolean input to force a tab to activate.
So in your case, just pass true to the *clrIfActive of the tab you want to programmatically select. How you do that depends on how you create your tab in the first place: statically, with an *ngFor, based on a specific tab model, ... We can't help you out more unless you provide an example of what you are trying to do.

How to match specific content of a drop down in TOSCA without selecting it?

Is there a way to verify that if a drop down contains a specific option without selecting that option in TOSCA?
Yes there that is possible. I tried it with a standard HTML combobox. For that you need to scan the page. Select the combobox in question and change the quickfilter to show the items from the drop down. Check the combobox itself and one of the items below (does not matter which one):
You can ignore the message that the item is not unique - just create the module.
Once you have the module in place, you can rename the item, so that it reflects that you want to use it as a generic item. Then (in the properties tab) add a 'Configuration Parameter' and call it 'ExplicitName' and set it's value to true. This will allow to edit the name of the item in the testcase. (more details in the help of Tosca 11.1)
You can then create a testcase and use the module on it. In the testcase you can change the name of the item to the text of the drop down item you want to check for (you can also use wildcards) and then verify that it exists.

Clicking in a dropdown with scroll in Capybara

I'm having a problem with my dropdown, It uses selectize to make the dropdown, but when the number of options is too big it adds a scroll to the dropdown and when I try to click in some option that is not seen (that you need to scroll it to see) the capybara thinks the option is there and click out of the input where the option would be without scrolling. There's nothing changing the visibility (ordering it to search for not visible elements don' work either)
you can click a visible element in drop-down than send the :arrow_down native key to simulate down key action. You should do this until the element visible, then click the active option.
Check this for selectize.js home page:
find("#select-country-selectized").click()
while(true)
break if find(".option.active").text == "Benin"
find("#select-country-selectized").native.send_keys(:arrow_down)
end
find(".option.active").click
The example of gunesmes was very helpfull, I made some changes like making the break one line up because otherwhise it would always jump the first option and changing the find for has_css? because find returns an error and has_css? returns true or false. I also changed the first find because I use cocoon and I need always to fill the last input generated. The final result was like this:
def scroll_dropdown(user)
all('input[id$="_user_id-selectized"]').last.click
while(true)
break if page.has_css?(".option.active", text: user, match: :prefer_exact, wait: false)
all('input[id$="_user_id-selectized"]').last.native.send_keys(:arrow_down)
end
find(".option.active").click
end

cq:DialogMode "floating" change dialog title

So I have a component in AEM that has an edit bar. Dialog mode of this bar is set to floating, and I need to change the title of the dialog. I have read all the docs I could find and have tried changing the dialog title as it would normally be done, but all that ever shows up is the default "Edit Component" title.
Can this be changed? And if so, how?
Edit: After removing the xtype as suggested, I was able to get the titles to show. This however caused another problem for my dialog that had an xtype of tabpanel. Those components now only have the first tab defined.
This issue occurs mostly because, the xtype for the cq:dialog node would be set to something else (most probably panel or tabpanel) instead of dialog.
Check for the same, and in case it has been set, change the xtype to dialog or remove the xtype altogether in order to view the title in the dialog's edit mode.

Flex: Is it possible to hide some tabs in tab navigator and show them only when certain event occurs

I am using tab navigator. And it has thee tabs "Search", "Show as text", "Show on map"
I have a address search box in Search tab. I would like to hide other two tabs if search has not happened yet. So if user hasn't searched any thing other two tabs shouldn't be visible.
Can you please tell me how can I achieve this?
Hiding tabs is a preferred way.
Second option is to disable tabs until search is done.
There are a couple ways to do this.
Use the TabNavigator's getTabAt() method which returns the Button that makes up the visual tab and set the visible property to false. It can be tricky with bindings.
The other option is to addChildAt or removeChildAt on the TabNavigaor depending on what tabs you want to show or hide.
As you mention disabling could also work. Do this by as well setting the tab's container to disabled.
I had used removeChildAt on tab navigator and works fine. But if you want to do specific actions on selected Tab then you should think about other solution because the removedChild is no longer available in tab navigator.

Resources