Commit a9e4d0f
committed
chore: fix imports/tests, correct eslint offenses
- These are functionally the same
chore: update imports for ModalContainerProvider
chore: add garden shadow package and update imports
- Garden shadow will be removed in a follow up, this first phase is just
a lift and shift to ensure everything is imported correctly
feat: add package for new-requests-list
chore: remove the dist folder
chore: add locales folder
chore: continue fixing imports
chore: add mocks folder for svgs to pass tests
chore: satisfy dependency
chore: remove ErrorBoundary duplicate
chore: use settings instead of themesettings dup
chore: fix test ts error by adding default fallback
chore: add default fallback colors to fix ts test error
chore: make ts happy ensuring return is never undefined with fallback value
fix: replace linkColor with primaryEmphasis
- linkColor was specific to themeSettings and only used here as far as I could see,
garden contains primaryEmphasis which is the color used for links,
so have replaced linkColor with this.
fix: add fallbacks&correct further eslint offenses
- Fallback to "pending" status color and label if status is undefined
fix: organizations map return value branch missing
- the else statement of of the subscriptions map function was missing
resulting in a test / TS error. Have replaced the if statement with a slice
to make sure we are only working with the first elements up to amountShowing.
fix: typescript potential undefined errors
Address 3 ts errors in file
1. allowing for data to be returned as any due to potential undefined
2. adding undefined to return type of getDefaultOrganization
3. handleTabSelect not invoking id if default org is undefined
fix: ts undefined in FieldTags and DateFilter
- Add fallback to empty string in datefilter
- FilterValues in fieldTags had multiple ts warning errors for potential
undefined values, these were addressed by restructuring conditionals and adding
extra undefined checks
chore: correct eslint offenses
- Allow the same any types that we did in new request list
- Remove unused React imports
- Make shadow root container kebab case
fix: yarn build circular dependency
fix: fix ts undefined calendar errors
fix: add default en translation to jest setup
fix: data-test-id not being found and clearAllMocks
- Replaced `getByTestId` with `getByRole` to correctly target checkboxes
by their accessible names
- Added `jest.clearAllMocks()` in the afterEach hook to reset mock states
because otherwise the mock calls were accumulating across the test suite
fix: filter modal tests not finding data-test-ids
Replaced the data test id finders with clicks on Start textbox
to get the datepicker to show up,
then traversed the DOM to find the calendar items.
fix: organization data test id not being found
fix: find by role instead of data test id
fix: ensure tests always run in UTC zone
chore: remove uneeded types from HCData.ts
- These types can be derived from settings, so when initialising the
newrequest list app we only need:
<div class="container">
<header class="my-activities-header">
<h1>{{t "requests"}}</h1>
</header>
<div id="main-content">
</div>
</div>
<script type="module">
const requestListSettings = {{json settings}};
const themeProps = { settings: requestListSettings };
const userProps = { locale:{{json help_center.base_locale}}, }
const dataProps = { user: userProps, theme: themeProps, };
import { renderRequestList } from "request-list";
const container = document.getElementById("main-content");
renderRequestList(container,dataProps);
</script>
fix: translations folder location
chore: address review
- Removed unused
- Use files from shared
- Locales fixed, had accidentally rebased and dropped the correct commit
- Use same rendering method as the remaining apps
- Use strings lookup in STATUS_MAPPING to avoid extra eslint fixes
- Rebase with master and update yarn.lock
app can by tested by modifying the requests_page.hbs i.e:
<div class="container">
<header class="my-activities-header">
<h1>{{t "requests"}}</h1>
</header>
<div id="main-content">
</div>
</div>
<script type="module">
const requestListSettings = {{json settings}};
const themeProps = { settings: requestListSettings };
const userProps = { locale:{{json help_center.base_locale}}, }
const dataProps = { user: userProps, theme: themeProps, };
import { renderNewRequestList } from "new-request-list";
const container = document.getElementById("main-content");
renderNewRequestList(container,dataProps);
</script>
chore: rename new request list to request list
chore: address review part 21 parent ab0b0ea commit a9e4d0f
213 files changed
Lines changed: 21029 additions & 354 deletions
File tree
- __mocks__
- assets
- src/modules
- new-request-list
- components/error-boundary
- i18n
- request-list
- components
- relative-time
- requests-list
- requests-table
- requests-column-filter
- requests-table-row
- requests-tabs
- requests-toolbar
- filter-modal
- filter-tags
- organizations-dropdown
- organizatios-management
- contexts
- data-types
- hc
- request-list-params
- hooks
- translations
- locales
- utils
- pagination
- templates
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
3 | 18 | | |
4 | 19 | | |
5 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 0 additions & 57 deletions
This file was deleted.
This file was deleted.
0 commit comments