Goal:
Just show enough information, but encourage clicking for me.
Background:
With Extrinsics display (use this as a trial), we should rather then showing the full documentation, rather only show part. For example, currently we have -

This will be better served with "Set the current time. This call should be invoked exactly once per block. It will panic..." - just a single line, when we expand, we show the full.
Actions:
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
__This issue now has a funding of 60.0 DAI (60.0 USD @ $1.0/DAI) attached to it.__
@deeayeen Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@gitcoinbot
Yes I am currently finding a viable solution.
@deeayeen Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@jacogr is this still required? If so, can I work on this? I have already applied through gitcoin.
Still required. A maybe slightly tricky enhancement, but really will help a lot with the overall UI since we use this extensively.
Thanks for the interest, if this ticket returns to Open we will re-look, and will keep it as a bounty.
So, this is not open now?
@jacogr
I have stopped working on this as other obligations have come up, someone else can take over 👍
@pbteja1998 you’ve been approved to start working now
@pbteja1998 are you still working on this?
Yes, I am still trying to find a way to implement this with css alone. I did not find anything yet.
By the way, the expansion that is happening when clicked, is it done with js or css? I could not find any related js for that.
All just <details><summary>...header...</summary>... body ...</details>standard HTML - i.e. https://github.com/polkadot-js/apps/blob/master/packages/app-explorer/src/Events.tsx#L57 and https://github.com/polkadot-js/apps/blob/master/packages/app-explorer/src/BlockInfo/Extrinsics.tsx#L65
So the options are -
Expand component to packages/ui-app and replacing occurrences of detail/summary@pbteja1998 thanks for the update, as you can see @jacogr left you some comments, let us know if you need any more help!
Just my two cents on this - may be of help to the active worker.
A CSS implementation may work if ellipses rules are conformed to. The show all toggle would remove height constraints and text-overflow properties
This JS String modifier would condense the string to the nearest word, but would need an additional calculation on how long that string can be based on container width
Other possibly-useful strategies (if JS implementation needed):
Using a fixed width character font sheet, whereby all characters conform to the same width and therefore easy to calculate where cut off point is. Worth a look on fontsquirrel.com
Go deeper to ascertain character width ratios on the chosen font to again make that calculation possible.
@pbteja1998 Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
@jacogr How is it expanding when clicked on it. Where is the related css code?(Assuming that there is no js involved) I found out the html, but I am still unable to figure out how it is expanding when clicked on it. Is some class is being added to details or summary tag? Because when I inspected the element nothing is being added to the details.
EDIT
I found out that open attribute is being added to details when clicked on it. So wrote the css according to it.
Related PR
@jacogr There was some problem with submitting through gitcoin. Is it possible to just tip me instead through gitcoin?
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
__Work for 60.0 DAI (60.0 USD @ $1.0/DAI) has been submitted by__:
@Web3Foundation please take a look at the submitted work:
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
__The funding of 60.0 DAI (60.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @pbteja1998.__
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
Most helpful comment
@gitcoinbot
Yes I am currently finding a viable solution.