Skip to content

Commit

Permalink
FIX: Remove PA columns (#170)
Browse files Browse the repository at this point in the history
closes #170
  • Loading branch information
dwhieb committed Jul 20, 2024
1 parent fd732d6 commit 1a54915
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 53 deletions.
4 changes: 0 additions & 4 deletions data/Database.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default class Database {
definition,
form,
language,
PA,
tokens,
UR,
}) {
Expand All @@ -40,17 +39,14 @@ export default class Database {

return normalize(definition)?.includes(q)
|| normalize(form)?.includes(q)
|| normalize(PA)?.includes(q)
|| normalize(UR)?.includes(q)
|| tokens.some(function({
form,
gloss,
PA,
UR,
}) {
return normalize(form)?.includes(q)
|| normalize(gloss)?.includes(q)
|| normalize(PA)?.includes(q)
|| normalize(UR)?.includes(q)
})

Expand Down
2 changes: 1 addition & 1 deletion layouts/main/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ html {

main {
flex-grow: 1;
max-inline-size: min(var(--measure), 100%);
max-inline-size: min(var(--measure), 100vw);
padding: 1em;
}
2 changes: 1 addition & 1 deletion pages/About/About.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ blockquote p {

#main {
container-type: inline-size;
inline-size: 100%;
inline-size: 100vw;
}

.subtitle {
Expand Down
12 changes: 6 additions & 6 deletions pages/Component/Component.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
@import 'transcription.css';

:is(.metadata, .sources, .stems) {
overflow-x: auto;
margin-inline: 1em;
max-width: 100%;
width: 100%;
overflow-x: auto;
margin-inline: 1em;
max-inline-size: 100%;
inline-size: 100%;
}

.allomorphs {
Expand Down Expand Up @@ -86,14 +86,14 @@ legend {
}

#main {
max-inline-size: min(60em, 100%);
max-inline-size: min(60em, 100vw);
row-gap: 1em;
}

.page-header {
align-items: center;
text-align: center;
width: 100%;
inline-size: 100%;
}

table {
Expand Down
14 changes: 7 additions & 7 deletions pages/Search/Search.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@

/* Multi-Element Styles */

:is(.form, .PA, .source-forms, .source-PA, .source-URs, .UR) {
:is(.form, .source-forms, .source-URs, .UR) {
white-space: nowrap;
}

/* Element-Specific Styles */

body {
inline-size: fit-content !important;
max-inline-size: none;
max-inline-size: 100vw;
min-inline-size: 100vw;
overflow-x: auto !important;
}
Expand Down Expand Up @@ -119,7 +119,7 @@ label {
#main {
align-items: flex-start;
align-self: stretch;
max-inline-size: 100%;
max-inline-size: 100vw;
padding: 0;
}

Expand Down Expand Up @@ -167,7 +167,7 @@ label {

border-collapse: separate; /* This is necessary for borders to stay fixed with position: sticky */
margin: 0;
min-inline-size: 100%;
min-inline-size: 100vw;

& td {
border-block-end: var(--cell-border);
Expand All @@ -176,7 +176,7 @@ label {
}

/* Separator between component and sources fields */
:is(td, th):nth-child(7) {
:is(td, th):nth-child(6) {
border-inline-end: var(--thick-border);
}

Expand Down Expand Up @@ -226,8 +226,8 @@ label {
}

.results-wrapper {
inline-size: 100%;
max-inline-size: 100%;
inline-size: 100vw;
max-inline-size: 100vw;
}

search {
Expand Down
20 changes: 2 additions & 18 deletions pages/Search/Search.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@
<thead>
<tr class=meta-row>
{{!-- Component Fields --}}
<th colspan=7 scope=col>
<th colspan=6 scope=col>
<span>Components</span><br><span class='help-text th-note'>(Project Orthography)</span>
</th>
{{!-- Token Fields --}}
<th colspan=4 scope=col>
<th colspan=3 scope=col>
<span>Sources</span><br><span class='help-text th-note'>(Original Orthographies)</span>
</th>
</tr>
Expand Down Expand Up @@ -105,13 +105,6 @@
</button>
{{#if UR }}<span aria-describedby=priority-hint class=priority>{{ UR.priority }}</span>{{/if}}
</th>
<th {{#if PA }} aria-sort='{{ PA.direction }}' {{/if}} scope=col>
<button aria-describedby=sort-hint class=sort-button data-field=PA>
<span>Proto-Algonquian</span>
<svg aria-hidden class=sort-icon><use href='{{#if (is PA.direction 'ascending') }}#ascending{{else if (is PA.direction 'descending') }}#descending{{else}}#sort{{/if}}'></svg>
</button>
{{#if PA }}<span aria-describedby=priority-hint class=priority>{{ PA.priority }}</span>{{/if}}
</th>
<th {{#if definition }} aria-sort='{{ definition.direction }}' {{/if}} scope=col>
<button aria-describedby=sort-hint class=sort-button data-field=definition>
<span>Definition</span>
Expand All @@ -138,7 +131,6 @@
{{!-- Token Fields --}}
<th class=token-th scope=col>Forms</th>
<th class=token-th scope=col>URs</th>
<th class=token-th scope=col>Proto-Algonquian</th>
<th class=token-th scope=col>Glosses</th>

</tr>
Expand All @@ -149,7 +141,6 @@
<td class=language>{{ displayLanguage }}</td>
<td class=form>{{#if form }}<a class=link href='/components/{{ ID }}'>{{ form }}</a>{{else}}{{/if}}</td>
<td class=UR>{{#if UR }}<a class=link href='/components/{{ ID }}'>/{{ UR }}/</a>{{else}}{{/if}}</td>
<td class=PA>{{#if PA }}{{ PA }}{{else}}{{/if}}</td>
<td class=definition>{{#if definition }}{{ definition }}{{else}}{{/if}}</td>
<td class=component-type>{{#if type }}{{ type }}{{else}}{{/if}}</td>
<td class=subcategory>{{#if subcategory }}{{ subcategory }}{{else}}{{/if}}</td>
Expand All @@ -167,13 +158,6 @@
{{/each}}
</ul>
</td>
<td class=source-PA>
<ul>
{{#each tokens as |token| }}
<li>{{#if PA }}{{ PA }}{{else}}{{/if}}</li>
{{/each}}
</ul>
</td>
<td class=source-glosses>
<ul>
{{#each tokens as |token| }}
Expand Down
16 changes: 0 additions & 16 deletions pages/Search/Search.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@ describe(`Search`, function() {
cy.get(`#results tbody tr`).should(`have.length`, 1)
})

it(`Proto-Algonquian (Project)`, function() {
cy.visit(`/search`)
cy.get(`#search-box`).type(`(aa)ntep`)
cy.get(`form`).submit()
cy.get(`.num-results`).should(`include.text`, 1)
cy.get(`#results tbody tr`).should(`have.length`, 1)
})

it(`Definition (Project)`, function() {
cy.visit(`/search`)
cy.get(`#search-box`).type(`motorize`)
Expand All @@ -108,14 +100,6 @@ describe(`Search`, function() {
cy.get(`#results tbody tr`).should(`have.length`, 1)
})

it(`Proto-Algonquian (Source)`, function() {
cy.visit(`/search`)
cy.get(`#search-box`).type(`-eʔs-`)
cy.get(`form`).submit()
cy.get(`.num-results`).should(`include.text`, 1)
cy.get(`#results tbody tr`).should(`have.length`, 1)
})

it(`Definitions (Source)`, function() {
cy.visit(`/search`)
cy.get(`#search-box`).type(`motorisé`)
Expand Down

0 comments on commit 1a54915

Please sign in to comment.