Skip to content

ROFL app details page fixes #1960

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

Merged
merged 6 commits into from
May 24, 2025
Merged

Conversation

csillag
Copy link
Contributor

@csillag csillag commented May 14, 2025

Tweak 1: implement page title shortening in table and mobile mode

Before After Comment
image image No change in desktop size
image image Automatic shortening of title at tablet and mobile sizes

Tweak 2: Enable highlighting matching ROFL addresses on mouse hover

(Currently this is only enabled on desktop.)

image

Tweak 3:

Enable tool-tip on shortened app ids:

image

Copy link

github-actions bot commented May 14, 2025

Deployed to Cloudflare Pages

Latest commit: 23539cb3edf554aa1772747abe13c5edcc7f5875
Status:✅ Deploy successful!
Preview URL: https://ce91890d.oasis-explorer.pages.dev
Alias: https://pr-1960.oasis-explorer.pages.dev

@csillag csillag force-pushed the csillag/rofl-all-details-page-fixes branch from e31b360 to aa371e6 Compare May 14, 2025 23:39
@csillag csillag marked this pull request as ready for review May 14, 2025 23:39
@csillag csillag changed the title Rofl all details page fixes ROFL app details page fixes May 14, 2025
@csillag csillag self-assigned this May 14, 2025
@csillag csillag force-pushed the csillag/rofl-all-details-page-fixes branch 5 times, most recently from aef6d99 to 7c5dd81 Compare May 21, 2025 13:58
csillag added 3 commits May 23, 2025 19:14
This flags means that we don't really want to see a link, just the label,
but we still want to see all the other transformations applied.

(This makes it easier to keep things consistent)
@csillag csillag force-pushed the csillag/rofl-all-details-page-fixes branch from 7c5dd81 to 3a4ab1e Compare May 23, 2025 17:14
csillag added 3 commits May 23, 2025 19:15
These are all optional features, disabled by default.
This fixes title on mobile, when displaying a long address.
(The link is used in labelOnly mode, so no actual link is displayed)
@csillag csillag force-pushed the csillag/rofl-all-details-page-fixes branch from 3a4ab1e to 23539cb Compare May 23, 2025 17:16
<MuiLink component={RouterLink} to={to}>
{name ? <HighlightedText text={name} pattern={highlightedPart} /> : address}
</MuiLink>
{labelOnly ? (
Copy link
Member

@lukaw3d lukaw3d May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any alternative ideas for future to avoid every component adding labelOnly mode?

Copy link
Contributor Author

@csillag csillag May 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any alternative ideas for future to avoid every component adding labelOnly mode?

So, the rationale was this:

We want to do a lot of things in our links. (Show a name, or an address, or both; do highlighting based on mouse pointer and search pattern, do shortening, either fixed or adapting length, specific formatting). There are many combinations of this, some is based on configuration, some context dependent, etc.

We want to do all of these consistently both on links and labels. Duplicating the code would suck, so we keep everything together, and use the labelOnly flag to switching off linking when not needed.

An alternative would be to always have a pair of components, like <WhateverLink> and <WhateverLabel>, which would share their internal formatting and other behavior logic, except the link thing itself. Should we try that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 doesn't sound better

@csillag csillag merged commit e59c60c into master May 24, 2025
9 checks passed
@csillag csillag deleted the csillag/rofl-all-details-page-fixes branch May 24, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants