Skip to content

Commit

Permalink
Merge pull request #762 from RockefellerArchiveCenter/development
Browse files Browse the repository at this point in the history
Only fetch children if they are missing
  • Loading branch information
helrond authored Dec 4, 2024
2 parents f215e22 + 2a33b7b commit d2183a4
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 31 deletions.
4 changes: 3 additions & 1 deletion src/components/RecordsContent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ export const RecordsChild = props => {
if (targetIsDirectDescendant) { /* 1 */
getInitialSiblings(itemUri, params)
} else { /* 2 */
getPages(appendParams(itemUri, {...params, limit: pageSize}))
if (!children.length) {
getPages(appendParams(itemUri, {...params, limit: pageSize, offset: 0}))
}
}
}
}, [isParentCollection, itemUri, params, targetIsDirectDescendant])
Expand Down
6 changes: 3 additions & 3 deletions src/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ msgstr "{0, select, true {Minimap} other {Einführung in die Minimap}}"
msgid "{0, select, true {Request {1} Items} other {Request {2} Item}}"
msgstr "{0, select, true {Anfordern {1} Element} other {Anfordern {2} Elemente}}"

#: src/components/RecordsContent/index.js:232
#: src/components/RecordsContent/index.js:234
msgid "{0, select, true {View} other {View Online}}"
msgstr "{0, select, true {Ansehen} other {Online ansehen}}"

Expand Down Expand Up @@ -214,7 +214,7 @@ msgid "<0>Last requested on: {0}</0>"
msgstr "<0>Zuletzt angefordert am: {0}</0>"

#. Records content is loading
#: src/components/RecordsContent/index.js:401
#: src/components/RecordsContent/index.js:403
msgid "<0>Loading</0>"
msgstr "<0>Laden</0>"

Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr "Schließen"
#. switcher label text content
#. Collection Content title
#: src/components/ContextSwitcher/__tests__/ContextSwitcher.test.js:20
#: src/components/RecordsContent/index.js:405
#: src/components/RecordsContent/index.js:407
msgid "Collection Content"
msgstr "Sammlung Inhalt"

Expand Down
6 changes: 3 additions & 3 deletions src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ msgstr "{0, select, true {Minimap} other {Introducing the Minimap}}"
msgid "{0, select, true {Request {1} Items} other {Request {2} Item}}"
msgstr "{0, select, true {Request {1} Items} other {Request {2} Item}}"

#: src/components/RecordsContent/index.js:232
#: src/components/RecordsContent/index.js:234
msgid "{0, select, true {View} other {View Online}}"
msgstr "{0, select, true {View} other {View Online}}"

Expand Down Expand Up @@ -214,7 +214,7 @@ msgid "<0>Last requested on: {0}</0>"
msgstr "<0>Last requested on: {0}</0>"

#. Records content is loading
#: src/components/RecordsContent/index.js:401
#: src/components/RecordsContent/index.js:403
msgid "<0>Loading</0>"
msgstr "<0>Loading</0>"

Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr "Close"
#. switcher label text content
#. Collection Content title
#: src/components/ContextSwitcher/__tests__/ContextSwitcher.test.js:20
#: src/components/RecordsContent/index.js:405
#: src/components/RecordsContent/index.js:407
msgid "Collection Content"
msgstr "Collection Content"

Expand Down
6 changes: 3 additions & 3 deletions src/locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ msgstr "{0, select, true {Minimap} other {Introducción al minimapa}}"
msgid "{0, select, true {Request {1} Items} other {Request {2} Item}}"
msgstr "{0, select, true {Solicitar {1} Items} other {Solicitar {2} Item}}"

#: src/components/RecordsContent/index.js:232
#: src/components/RecordsContent/index.js:234
msgid "{0, select, true {View} other {View Online}}"
msgstr "{0, select, true {Ver} other {Ver en línea}}"

Expand Down Expand Up @@ -214,7 +214,7 @@ msgid "<0>Last requested on: {0}</0>"
msgstr "<0>Última solicitud el: {0}</0>"

#. Records content is loading
#: src/components/RecordsContent/index.js:401
#: src/components/RecordsContent/index.js:403
msgid "<0>Loading</0>"
msgstr "<0>Cargando</0>"

Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr "Cerrar"
#. switcher label text content
#. Collection Content title
#: src/components/ContextSwitcher/__tests__/ContextSwitcher.test.js:20
#: src/components/RecordsContent/index.js:405
#: src/components/RecordsContent/index.js:407
msgid "Collection Content"
msgstr "Contenido de la colección"

Expand Down
6 changes: 3 additions & 3 deletions src/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ msgstr "{0, select, true {Minimap} other {Introduction de la carte minimale}}"
msgid "{0, select, true {Request {1} Items} other {Request {2} Item}}"
msgstr "{0, select, true {Demander {1} éléments} other {Demander {2} élément}}"

#: src/components/RecordsContent/index.js:232
#: src/components/RecordsContent/index.js:234
msgid "{0, select, true {View} other {View Online}}"
msgstr "{0, select, true {Voir} other {Voir en ligne}}"

Expand Down Expand Up @@ -214,7 +214,7 @@ msgid "<0>Last requested on: {0}</0>"
msgstr "<0>Dernière demande le : {0}</0>"

#. Records content is loading
#: src/components/RecordsContent/index.js:401
#: src/components/RecordsContent/index.js:403
msgid "<0>Loading</0>"
msgstr "<0>Chargement</0>"

Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr "Fermer"
#. switcher label text content
#. Collection Content title
#: src/components/ContextSwitcher/__tests__/ContextSwitcher.test.js:20
#: src/components/RecordsContent/index.js:405
#: src/components/RecordsContent/index.js:407
msgid "Collection Content"
msgstr "Contenu de la collection"

Expand Down
6 changes: 3 additions & 3 deletions src/locales/it/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ msgstr "{0, select, true {Minimap} other {Introduzione della minimappa}}"
msgid "{0, select, true {Request {1} Items} other {Request {2} Item}}"
msgstr "{0, select, true {Richiesta {1} Elementi} other {Richiesta {2} Elemento}}"

#: src/components/RecordsContent/index.js:232
#: src/components/RecordsContent/index.js:234
msgid "{0, select, true {View} other {View Online}}"
msgstr "{0, select, true {Visualizzazione} other {Visualizza online}}"

Expand Down Expand Up @@ -214,7 +214,7 @@ msgid "<0>Last requested on: {0}</0>"
msgstr "<0>Ultima richiesta il: {0}</0>"

#. Records content is loading
#: src/components/RecordsContent/index.js:401
#: src/components/RecordsContent/index.js:403
msgid "<0>Loading</0>"
msgstr "<0>Caricamento</0>"

Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr "Chiudi"
#. switcher label text content
#. Collection Content title
#: src/components/ContextSwitcher/__tests__/ContextSwitcher.test.js:20
#: src/components/RecordsContent/index.js:405
#: src/components/RecordsContent/index.js:407
msgid "Collection Content"
msgstr "Contenuto della collezione"

Expand Down
6 changes: 3 additions & 3 deletions src/locales/ja/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ msgstr "{0, select, true {Minimap} other {ミニマップの紹介}}"
msgid "{0, select, true {Request {1} Items} other {Request {2} Item}}"
msgstr "{0, select, true {リクエスト {1} アイテム} other {リクエスト {2} アイテム}}"

#: src/components/RecordsContent/index.js:232
#: src/components/RecordsContent/index.js:234
msgid "{0, select, true {View} other {View Online}}"
msgstr "{0, select, true {観る} other {オンラインで見る}}"

Expand Down Expand Up @@ -214,7 +214,7 @@ msgid "<0>Last requested on: {0}</0>"
msgstr "<0>最終リクエスト日{0}</0>"

#. Records content is loading
#: src/components/RecordsContent/index.js:401
#: src/components/RecordsContent/index.js:403
msgid "<0>Loading</0>"
msgstr "<0>ローディング</0>"

Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr "閉じる"
#. switcher label text content
#. Collection Content title
#: src/components/ContextSwitcher/__tests__/ContextSwitcher.test.js:20
#: src/components/RecordsContent/index.js:405
#: src/components/RecordsContent/index.js:407
msgid "Collection Content"
msgstr "コレクション内容"

Expand Down
6 changes: 3 additions & 3 deletions src/locales/ko/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ msgstr "{0, select, true {Minimap} other {미니맵 소개}}"
msgid "{0, select, true {Request {1} Items} other {Request {2} Item}}"
msgstr "{0, select, true {요청 {1} 항목} other {요청 {2} 항목}}"

#: src/components/RecordsContent/index.js:232
#: src/components/RecordsContent/index.js:234
msgid "{0, select, true {View} other {View Online}}"
msgstr "{0, select, true {보다} other {온라인 보기}}"

Expand Down Expand Up @@ -214,7 +214,7 @@ msgid "<0>Last requested on: {0}</0>"
msgstr "<0>마지막으로 요청된 시간: {0}</0>"

#. Records content is loading
#: src/components/RecordsContent/index.js:401
#: src/components/RecordsContent/index.js:403
msgid "<0>Loading</0>"
msgstr "<0>로드 중</0>"

Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr "닫기"
#. switcher label text content
#. Collection Content title
#: src/components/ContextSwitcher/__tests__/ContextSwitcher.test.js:20
#: src/components/RecordsContent/index.js:405
#: src/components/RecordsContent/index.js:407
msgid "Collection Content"
msgstr "컬렉션 콘텐츠"

Expand Down
6 changes: 3 additions & 3 deletions src/locales/pt/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ msgstr "{0, select, true {Minimap} other {Apresentando o Minimapa}}"
msgid "{0, select, true {Request {1} Items} other {Request {2} Item}}"
msgstr "{0, select, true {Solicitar {1} Item} other {Solicitar Unid {2}}}"

#: src/components/RecordsContent/index.js:232
#: src/components/RecordsContent/index.js:234
msgid "{0, select, true {View} other {View Online}}"
msgstr "{0, select, true {Exibir} other {Exibir online}}"

Expand Down Expand Up @@ -214,7 +214,7 @@ msgid "<0>Last requested on: {0}</0>"
msgstr "<0>Última solicitação em: {0}</0>"

#. Records content is loading
#: src/components/RecordsContent/index.js:401
#: src/components/RecordsContent/index.js:403
msgid "<0>Loading</0>"
msgstr "<0>Carregamento</0>"

Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr "Fechar"
#. switcher label text content
#. Collection Content title
#: src/components/ContextSwitcher/__tests__/ContextSwitcher.test.js:20
#: src/components/RecordsContent/index.js:405
#: src/components/RecordsContent/index.js:407
msgid "Collection Content"
msgstr "Conteúdo da coleção"

Expand Down
6 changes: 3 additions & 3 deletions src/locales/tr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ msgstr "{0, select, true {Minimap} other {Minimap Tanıtımı}}"
msgid "{0, select, true {Request {1} Items} other {Request {2} Item}}"
msgstr "{0, select, true {Materyalleri̇ Talep et {1}} other {Materyalleri̇ Talep et {2}}}"

#: src/components/RecordsContent/index.js:232
#: src/components/RecordsContent/index.js:234
msgid "{0, select, true {View} other {View Online}}"
msgstr "{0, select, true {Görüş} other {Çevri̇mi̇çi̇ Görüntüle}}"

Expand Down Expand Up @@ -214,7 +214,7 @@ msgid "<0>Last requested on: {0}</0>"
msgstr "<0>Son talep tarihi: {0}</0>"

#. Records content is loading
#: src/components/RecordsContent/index.js:401
#: src/components/RecordsContent/index.js:403
msgid "<0>Loading</0>"
msgstr "<0>Yükleniyor</0>"

Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr "Kapat"
#. switcher label text content
#. Collection Content title
#: src/components/ContextSwitcher/__tests__/ContextSwitcher.test.js:20
#: src/components/RecordsContent/index.js:405
#: src/components/RecordsContent/index.js:407
msgid "Collection Content"
msgstr "Koleksiyon İçeriği"

Expand Down
6 changes: 3 additions & 3 deletions src/locales/zh/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ msgstr "{0, select, true {Minimap} other {引入最小图}}"
msgid "{0, select, true {Request {1} Items} other {Request {2} Item}}"
msgstr "{0, select, true {请求 {1} 项目} other {请求 {2} 项目}}"

#: src/components/RecordsContent/index.js:232
#: src/components/RecordsContent/index.js:234
msgid "{0, select, true {View} other {View Online}}"
msgstr "{0, select, true {看法} other {在线查看}}"

Expand Down Expand Up @@ -214,7 +214,7 @@ msgid "<0>Last requested on: {0}</0>"
msgstr "<0>最后申请日期{0}</0>"

#. Records content is loading
#: src/components/RecordsContent/index.js:401
#: src/components/RecordsContent/index.js:403
msgid "<0>Loading</0>"
msgstr "<0>加载中</0>"

Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr "关闭"
#. switcher label text content
#. Collection Content title
#: src/components/ContextSwitcher/__tests__/ContextSwitcher.test.js:20
#: src/components/RecordsContent/index.js:405
#: src/components/RecordsContent/index.js:407
msgid "Collection Content"
msgstr "收藏内容目录"

Expand Down

0 comments on commit d2183a4

Please sign in to comment.