Skip to content
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

STCOR-932 implement useModuleInfo(path) to map path -> module #1578

Merged
merged 4 commits into from
Jan 22, 2025
Merged

Conversation

zburke
Copy link
Member

@zburke zburke commented Dec 23, 2024

Query discovery to retrieve information about the module implementing a given endpoint. Simple usage:

const { module } = useModuleInfo('/path');
// { name: 'mod-foo', ... }

Refs STCOR-932

Query discovery to retrieve information about the module implementing a
given endpoint. Simple usage:
```
const { module } = useModuleFor('/path');
// { name: 'mod-foo', ... }
```

Refs STCOR-932
@zburke zburke requested a review from a team as a code owner December 23, 2024 15:17
Copy link

github-actions bot commented Dec 23, 2024

Bigtest Unit Test Results

189 tests  ±0   184 ✅ ±0   6s ⏱️ ±0s
  1 suites ±0     5 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit af2bd81. ± Comparison against base commit 792d3b2.

This pull request removes 5 and adds 3 tests. Note that renamed tests count towards both.
      equal to check email label in english translation
      equal to check email precautions label in english translation
      equal to sent email precautions label in english translation
Chrome_131_0_0_0_(Linux_x86_64).Forgot username/password status test check email status page tests ‑ Forgot username/password status test check email status page tests should have the header with an appropriate text content
Chrome_131_0_0_0_(Linux_x86_64).Forgot username/password status test check email status page tests ‑ Forgot username/password status test check email status page tests should have the paragraph with an appropriate text content
Chrome_131_0_0_0_(Linux_x86_64).Forgot username/password status test check email status page tests ‑ Forgot username/password status test check email status page tests should have the header with an appropriate text content
      equal to check email label in english translation
Chrome_131_0_0_0_(Linux_x86_64).Forgot username/password status test check email status page tests ‑ Forgot username/password status test check email status page tests should have the paragraph with an appropriate text content
      equal to check email precautions label in english translation
Chrome_131_0_0_0_(Linux_x86_64).Forgot username/password status test check email status page tests ‑ Forgot username/password status test check email status page tests should have the paragraph with an appropriate text content
      equal to sent email precautions label in english translation

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 23, 2024

Jest Unit Test Results

  1 files  ±0   62 suites  +1   1m 34s ⏱️ ±0s
364 tests +4  364 ✅ +4  0 💤 ±0  0 ❌ ±0 
367 runs  +4  367 ✅ +4  0 💤 ±0  0 ❌ ±0 

Results for commit af2bd81. ± Comparison against base commit 792d3b2.

♻️ This comment has been updated with latest results.

@JohnC-80
Copy link
Contributor

JohnC-80 commented Jan 9, 2025

Pedantic, useModuleFor seems like an odd name... useModuleInfo, useModuleName or useBEModuleName ?

Also needs a top-level export.

@zburke
Copy link
Member Author

zburke commented Jan 13, 2025

Pedantic, useModuleFor seems like an odd name...

Fair, @JohnC-80. My thinking was "you give it a path, it gives you module info" but I agree the name is awkward. You get more than just the module-name as a return value, hence avoiding "name" in the name. So ... useModuleInfo()? useGetModuleFromPath()?

@JohnC-80
Copy link
Contributor

@zburke I like useModuleInfo() The API is documentable, but the name tells you what it provides - info about the module.

@zburke zburke changed the title STCOR-932 implement useModuleFor(path) to map path -> module STCOR-932 implement useModuleInfo(path) to map path -> module Jan 16, 2025
@zburke zburke requested a review from JohnC-80 January 16, 2025 19:06
@zburke
Copy link
Member Author

zburke commented Jan 16, 2025

@JohnC-80: I added exports and renamed the hook. Take another look?

@zburke zburke merged commit 2049911 into master Jan 22, 2025
16 checks passed
@zburke zburke deleted the STCOR-932 branch January 22, 2025 18:23
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