Customise performAction of UIActivityTypePostToTwitter - uiactivityviewcontroller

when presenting UIActivityViewController, I want to send the message directly instead of presenting composing dialog when user select "Twitter" or "Facebook".
Is it possible to do this?
or I have to create a new UIActivity to do this?

I think the Answer is Yes.
I have to write my own activity provider, and custom activites, to achieve what I intended.
The problem is all images displayed in custom activities are black-white, only the skeleton left. I think Apple want to keep an consistent UI, preventing developers provider "Pool" taste images which mess up the whole UI experience.

Related

How can I filter skills in Twilio Flex Team View page

How can I filter the skills list on the Twilio flex team view page? I need to filter the skills based on the worker role. I can detect the role from worker attributes. But how can I filter the skills displaying in team view when clicking on agent name at Twilio flex. I don't want to display all skills, I want to display some of them.
Or, is there any listener that I can use to detect when that panel is opening? In that situation, I can filter the skills view using the DOM selector.
Twilio developer evangelist here.
I don't have a good answer for you, I'm afraid, as that's a bit further into Flex than I've managed to go. However, I have some ideas.
You can listen for a worker to be selected in the supervisor view using the Actions Framework SelectWorkerInSupervisor action (you can listen to beforeSelectWorkerInSupervisor or afterSelectWorkerInSupervisor.
The thing I'm not sure about is how to actually filter the skills. I was looking at this filtering plugin for inspiration but I couldn't quite tell what was going on. I wonder if you can affect the state in redux based on your currently selected worker.
Sorry, this isn't a full answer. Hopefully it gives you some ideas though.

Admin-on-rest: how to decrease button spacing and how to edit page without ID in url

I started with admin-on-rest recently and I love what it brings. However, I am stuck on 2 issues and I was hoping to get some help:
Question 1
I created a custom theme with custom color pallette etcetera. How can I reduce the spacing around buttons? You can see it on the demo here: https://marmelab.com/admin-on-rest-demo/#/customers/121, the save button has an indent of maybe 20-30 pixels. Can I remove this and align the button with the input fields, title, etcetera?
Question 2
What is the best approach for creating an /#/user/details/ view for example, where users can edit their own account details, re-using the EDIT component? I have now added this resource:
<Resource name="user/details" edit={EditDetails} />
I can edit the account by going to /#/user/details/ID (replacing ID with the actual user ID). But I don't want to expose the ID. Better yet, the SPA doesn't need to know about the ID at all, because the API can understand a PUT request to /user/details/ as a request to update the current user details. So I don't actually need the SPA to send or need this ID. Any ideas on this?
Question 1: https://marmelab.com/admin-on-rest/Theming.html#overriding-a-component-style
Customizing the Toolbar which contain the button will require a bit a of work in versions 1.*.*. You'll have to create a custom Toolbar using the original as a starting point (https://github.com/marmelab/admin-on-rest/blob/master/src/mui/form/Toolbar.js) and use it as the toolbar prop for your form (https://marmelab.com/admin-on-rest/CreateEdit.html#toolbar). This will be a lot easier in v2.
Question 2: this can be achieved using a custom restClient. In a nutshell, intercept calls which target the user resource and build the url yourself, not forgetting to handle the response.
However, for such a thing, I would advise against using the admin-on-rest mechanisms as it seems users are not really a resource but an application concept. As such you might want to handle this in a custom page with fetch by yourself.

What can developers do to make the browser ui easy to automate for testing?

I'm curious what things a developer can do to make the creation of automated tests easier for testers using selenium web driver. The only thing I'm thinking of is using unique IDs for fields, buttons, etc. Can anyone think of any thing else that can be done?
From my experience, this really helps to automate whole process:
Provide unique IDs to at least important buttons (submit form, search buttons...)
Do not use HTTP Basic Authentification. Use normal login instead
Get rid of CAPTCHA fields. At least on test environment.
Provide friendly URLs, so that certain areas of app can be reached immediately
When page is loading, show some load image. Best option is to provide some small element which loads only when whole page is loaded.
Get rid of hover-only menus on page (you have to hover certain element to see other)

DNN "Welcome to your new website" Pop Up

"Welcome to your new website" popup in DNN 7.2 and above shows some dynamic content. Its visible only to host users and doesn't reappears if "don't show this again" checkbox is checked once.
I need to develop something on similar lines where a popup should appear every-time a user of specific role(and some business logic) logs in. I think about creating a custom module and add it to all pages which could this for me but it seems welcome to your new site popup already tackles this.
Now I need to know if its somehow feasible to alter or extend this popup as per my need. I googled for some time and went through quick search in DNN code but haven't found anything convincing on this. Please suggest if what I think with this popup is feasible or I am searching in wrong path and creating custom module is my only way.
Thanks,
Ravi
I would think the best way to handle this would be with a custom skin object, and a custom module to manage the announcements.

CakePHP Modal Window Example

I'm using cakephp and I'm trying to implement a modal-window for login and singup, similar to the one in Digg.com "Join Digg! - Login". Does anyone knows about a library/plugin/tutorial/screencast or what ever to achieve a "login modal" in CakePHP?
By the way I already have working all the registration and authentication process, I just need the a modal example, how can I do that?
Thanks!
The popup on Digg is implemented in JavaScript. It looks like they might have their own code for it. One easy alternative that looks very similar is Fancybox. You can set up your login as its own page and show it in an iframe inside Fancybox's popup.
If you look through the Fancybox documentation, you'll find you can hook onto various open/close events which you might use (for example) to reload the main page for the newly authenticated user.
There are other popular "lightbox" JS implementations out there if Fancybox doesn't suit your needs.
You probably don't need a lot of CakePHP magic to make this work—or rather, you've already implemented the magic you DO need.
CakePHP doesn't have any built-in functionality to create modal windows, but jQuery UI does: http://jqueryui.com/demos/dialog/
I'd recommend this because it's a standard solution and pretty simple to set up. This is what I always use on CakePHP sites for creating and dealing with modal windows.

Resources