prefer @folio/stripes exports to private paths when importing components

Description

Overview: component imports should happen through the @folio/stripes/${repo} namespace rather than directly via the repo's private path. e.g. prefer

instead of

The following files contain incorrect imports:

Attn:

Environment

None

Potential Workaround

None

Attachments

2

Checklist

hide

TestRail: Results

Activity

Show:

Zak BurkeAugust 16, 2021 at 10:58 AM

Sounds good, . The doable work here is done!

Victoria_SmelovaAugust 16, 2021 at 7:42 AM

 are you Ok about closing this task?
Replacing private paths with @folio/stripes path will be done in scope of .

Vadym ShchekotilinAugust 12, 2021 at 10:15 AM

 I've merged changes related to JS imports, For CSS imports. I created a separate task https://folio-org.atlassian.net/browse/UIDEXP-247  and linked it to this one, as it will probably require additional effort.

Zak BurkeAugust 11, 2021 at 4:39 PM

You are correct about the CSS imports, . , , , any thoughts on if/how we can do this with some webpack magic? Reaching into the private structure of stripes-components feels icky.

If not, maaaaaybe we could mitigate the ickiness by declaring, "Thou shalt provide lib/ComponentName/ComponentName.css" for everything in stripes-components? Granted that's still icky, but at least it provides a veneer of standardization.

Vadym ShchekotilinAugust 11, 2021 at 3:00 PM

 I've fixed all the imports for JS, but I'm not sure if we can import CSS this way. To import CSS, we need the absolute path to the corresponding file. You may know of some webpack plugins that can help us import and export CSS this way, but I couldn't find it.

I mean that is'n possible to do something like this, because it's not possible to export CSS files from index, like we do in JS files:

Error:

 

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Firebird

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created May 26, 2021 at 7:12 PM
Updated October 8, 2021 at 11:49 AM
Resolved August 16, 2021 at 11:20 AM
TestRail: Cases
TestRail: Runs