-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add a copy button for the UUIDs of Samples, Batches and Boxes #1728
Add a copy button for the UUIDs of Samples, Batches and Boxes #1728
Comments
@jkicillof please could you provide an Icon for copying the UUID? Thanks! |
@diegoliberman I updated every sample, batch and box screen with UUID and copy button. The icon is from Google Material Icons set, yo can copy the icon name and use that if the icon font is installed, if not I can export it as svg. Batches already have an id but I think is manually entered, should we keep both? |
The Batch ID is manually entered, but I think it might provide value. Because when creating a box, you need to enter the Batch IDs, and perhaps it's comfortable to be able to copy and paste it. |
@jkicillof We're using a font file that is generated from https://icomoon.io/app/#/select where we can select the material icon to be added (details). Also, it would be nice to confirm the copy, for example a simple "copied" tooltip. |
icomoon.zip |
I'm not sure a snack bar notification is a good idea for this. Those usually notify about backend actions. IMO notification about copy to clipboard should better be placed in close proximity to the action item, like a tool tip. See the examples on https://clipboardjs.com/, I think that makes a lot of sense for a smooth UX. |
@straight-shoota ok, that makes sense. I don't know if this screen was implemented but you can find a tooltip style there. |
@jkicillof I don't know how the copy was added in the source, but it would be nice to add it at the end, as all the codes have changed. The \e900 was alert, now it is \e901 and the copy became \e900. |
I'm on it |
icomoon.zip |
icomoon.zip |
I don't know how to use ligatures, I can learn, but the whole project was already like this. |
I think |
If the entire project is using the codes, but we want to use ligatures, we should at least think about a plan on how to do that:
@ysbaddaden do you have any preference? Personally, I think I would start using ligatures (if everyone agrees that's better than the codes), and I'd create a technical debt ticket for changing all codes for their corresponding label. |
I updated the font and removed |
If it's just those classes that we need to change, or if it takes less than a couple of hours, go ahead and change it right now as part of this issue. |
Before refactoring this: I think it would be worth considering to ditch the icon font and just embed SVGs directly. That's a much easier workflow going forward, no need to deal with icomoon when adding new icons. |
@jkicillof The only process that worked for me is the one detailed here. It's quite tedious, and error prone. I agress with @straight-shoota: we should drop the icomoon font. Having a bunch of SVG files under It's just a little tricky because we do take advantage of having a font to change the icons' color depending on context. We thus can't simply use them as Ideally we'd have an Now, I just found out that we could use CSS filters to colorize an image... which means that we could probably use Here is an example: .icon-blue {
// rgb(238, 43, 36) => hsl(2deg, 185.6%, 53.7%)
filter: invert(1) brightness(50%) sepia(100%) saturate(10000%)
hue-rotate(207deg) saturate(189.7%) brightness(154.1%);
} .icon-red {
// rgb(33, 150, 243) => hsl(2deg, 85.6%, 53.7%)
filter: invert(1) brightness(50%) sepia(100%) saturate(10000%)
hue-rotate(2deg) saturate(185.6%) brightness(153.7%);
} Last but not least: nothing prevents us from gradually migrating to an |
I don't think the filter solution is clean because finding the color requires a few transformation (hex > rgb > hsl). If you can import the svgs and then use fill on css is ok to me but you'll have to update every place where it was used. We don't add icons very often so maybe we can leave it as it is right now and replace code with ligature to avoid code changes break every icon used. |
If I were to start something new I would certainly use the separate SVG but as the wheel is already turning this way, I think we can keep this for now. I liked the ligatures option, but I don't think it's necessary to change to ligatures, because in the |
All right @omelao, I agree. Let's wrap up this ticket and create a PR when you're ready. Thanks! |
Is this a real problem, though? Where would we actually use an SVG image as background? |
Sure, there's no additional cost to that. Except that adding every new icon is more tedious than it needs to be. |
Working properly in version 7757444 |
Story
As a generic user of CDx, I want to be able to copy the UUID so that that I can paste it somewhere else without the need of selecting the text.
Entities for adding the UUID
Acceptance criteria
The text was updated successfully, but these errors were encountered: