-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update meta-box-subscription-info.php #180
Conversation
remcotolsma
commented
Jun 3, 2024
- https://github.com/pronamic/pronamic-pay/issues/99#event-12998555481
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works, but looks a bit messy to me:
- 4 times the word "links" in titles
- all descriptions start with the phrase "This link can be shared with the customer", which also happens to be the same text as the "Action links" help tooltip
- right alignment of the button makes the button jump when "Copied!" disappears again
- URLs can be quite long, resulting in multiple lines, can we maybe truncate them someway without ending up with three equal URLs from the start of the URLs (e.g. all
https://pay.test/?subscription=43653&key=sub...
)?
Would a single description for all actions with clear titles not work, too?
views/meta-box-subscription-info.php
Outdated
.pronamic-pay-action-link { | ||
display: flex; | ||
|
||
flex-direction: column; | ||
|
||
gap: 5px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? Doesn't seem to have much effect on the styling, except for some random gap
spacing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random gap
spacing? It's a fixed gap
of 5px
? It can also be done with margin/padding, I thought this was flex 😏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, with ‘random gap’ I meant to say that a regular paragraph also adds some spacing if needed?
Did some small improvements in ca1f781.
Is that a problem?
Is that a problem?
Improved in ca1f781.
Not easy?
It is a pity that the explanation per link is lost, this one in particular may be valuable:
|
I wouldn't call it a "problem", but it looks a bit odd and I think that the title on the left side and blue underlining already make it clear enough that these are "links".
Yes, repetitive text makes it harder to differentiate between the purposes of the links when scanning the descriptions.
Maybe server-side then? (I can't imagine anyone ever going to select the URL to copy it, instead of copying via the context menu or copy button) $url = 'https://www.example.com/?subscription=43653&key=subscr_663b8737108d0&action=cancel';
echo \sprintf(
'%s...%s',
\substr( $url, 0, 32 ),
\substr( $url, -24 )
);
// https://www.example.com/?subscri...b8737108d0&action=cancel
Therefore I added "update" to the title, as users might not think of updating an expired card or current account as "changing" the payment method. But we could leave the last emphasised part to clarify these specific use cases? Moving the description before the link looks a bit more balanced IMO (especially now that there's more whitespace next to the copy button on its own line). |
This implementation makes it a quite massive block. I don't think it needs that much attention. Some additional suggesties.
Maybe use an input field after all? It will solve this issue and makes more sense in my opinion. |
Did some adjustments in 9a9a6de. I got inspiration from Woo Subscriptions:
I have already given reasons why I don't think this is ideal. Have you already considered that? Perhaps my objections can be resolved by adding a 'View page' button in addition to a copy button? Does that perhaps give us the best of both? |
I don't know if this is the best inspiration. It is a bit of confusing link. I already created an issue for that: https://github.com/pronamic/pronamic-pay/issues/97. We are now introducing the same issue here 😉. I think this is much better: But still not sure about the "View page" button. The primary task of the element is "Sharing the action links" with the customer. The copy button adds value for that. I don't think the "View page" button does. You can simply copy past the URL the browser to view the link if you want. Keep things clean and lean. Just my opinion. |
Not entirely, in the current implementation the links are provided with descriptions. But I was aware of this, which is why I came up with an alternative.
This is not the case, I have used the current links regularly. I won't use copying the links much myself. But seeing what the pages look like and what I share with the customer is something I am more likely to do. I also find it difficult to imagine that there are administrators who blindly copy this link and pass it on to their customer, you want to know what you are sharing with a customer. In that respect, it seems to me that the 'View page' is the primary function, and the copy link functionality is secondary. |
Originally posted by @rvdsteege in #180 (comment) I had this worked out, but this display also requires an additional header. Otherwise users does not know for what the URL is, so for now I will first merge #180 (comment). It is not perfect, but we also have ideas to revise these 3 pages/links: |