فهرست منبع

Merge branch 'edge' into meteor-1.8

Lauri Ojansivu 6 سال پیش
والد
کامیت
5841a3abea
12فایلهای تغییر یافته به همراه89 افزوده شده و 84 حذف شده
  1. 11 0
      CHANGELOG.md
  2. 1 1
      Stackerfile.yml
  3. 11 8
      client/components/lists/listBody.jade
  4. 40 49
      client/components/lists/listBody.js
  5. 1 1
      i18n/de.i18n.json
  6. 4 4
      i18n/es.i18n.json
  7. 1 1
      i18n/fr.i18n.json
  8. 6 6
      i18n/he.i18n.json
  9. 4 4
      i18n/pl.i18n.json
  10. 7 7
      i18n/tr.i18n.json
  11. 1 1
      package.json
  12. 2 2
      sandstorm-pkgdef.capnp

+ 11 - 0
CHANGELOG.md

@@ -1,3 +1,14 @@
+# v2.56 2019-03-27 Wekan release
+
+This release [fixes the following bugs](https://github.com/wekan/wekan/pull/2287), thanks to bentiss with Apache I-CLA:
+
+- [#2250 -> the spinner could be shown on startup and never goes away](https://github.com/wekan/wekan/issues/2250).
+- The code will now only load extra cards that will be in the current viewport.
+- When 2 users were interacting on the same board, there was a situation where the spinner could show up on the other user, without being able to load the extra cards.
+- The code is now much simpler, thanks to the IntersectionObserver, and all of this for fewer lines of code :)
+
+Thanks to above GitHub users for their contributions and translators for their translations.
+
 # v2.55 2019-03-25 Wekan release
 
 This release fixes the following bugs, thanks to bentiss with Apache I-CLA:

+ 1 - 1
Stackerfile.yml

@@ -1,5 +1,5 @@
 appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
-appVersion: "v2.55.0"
+appVersion: "v2.56.0"
 files:
   userUploads:
     - README.md

+ 11 - 8
client/components/lists/listBody.jade

@@ -13,14 +13,7 @@ template(name="listBody")
               class="{{#if MultiSelection.isSelected _id}}is-checked{{/if}}")
           +minicard(this)
       if (showSpinner (idOrNull ../../_id))
-        .sk-spinner.sk-spinner-wave.sk-spinner-list(
-          class=currentBoard.colorClass
-          id="showMoreResults")
-          .sk-rect1
-          .sk-rect2
-          .sk-rect3
-          .sk-rect4
-          .sk-rect5
+        +spinnerList
 
       if canSeeAddCard
         +inlinedForm(autoclose=false position="bottom")
@@ -30,6 +23,16 @@ template(name="listBody")
             i.fa.fa-plus
             | {{_ 'add-card'}}
 
+template(name="spinnerList")
+  .sk-spinner.sk-spinner-wave.sk-spinner-list(
+    class=currentBoard.colorClass
+    id="showMoreResults")
+    .sk-rect1
+    .sk-rect2
+    .sk-rect3
+    .sk-rect4
+    .sk-rect5
+
 template(name="addCardForm")
   .minicard.minicard-composer.js-composer
     if getLabels

+ 40 - 49
client/components/lists/listBody.js

@@ -7,28 +7,6 @@ BlazeComponent.extendComponent({
     this.cardlimit = new ReactiveVar(InfiniteScrollIter);
   },
 
-  onRendered() {
-    const domElement = this.find('.js-perfect-scrollbar');
-
-    this.$(domElement).on('scroll', () => this.updateList(domElement));
-    $(window).on(`resize.${this.data().listId}`, () => this.updateList(domElement));
-
-    // we add a Mutation Observer to allow propagations of cardlimit
-    // when the spinner stays in the current view (infinite scrolling)
-    this.mutationObserver = new MutationObserver(() => this.updateList(domElement));
-
-    this.mutationObserver.observe(domElement, {
-      childList: true,
-    });
-
-    this.updateList(domElement);
-  },
-
-  onDestroyed() {
-    $(window).off(`resize.${this.data().listId}`);
-    this.mutationObserver.disconnect();
-  },
-
   mixins() {
     return [Mixins.PerfectScrollbar];
   },
@@ -191,38 +169,11 @@ BlazeComponent.extendComponent({
     });
   },
 
-  spinnerInView(container) {
-    const parentViewHeight = container.clientHeight;
-    const bottomViewPosition = container.scrollTop + parentViewHeight;
-
-    const spinner = this.find('.sk-spinner-list');
-
-    const threshold = spinner.offsetTop;
-
-    return bottomViewPosition > threshold;
-  },
-
   showSpinner(swimlaneId) {
     const list = Template.currentData();
     return list.cards(swimlaneId).count() > this.cardlimit.get();
   },
 
-  updateList(container) {
-    // first, if the spinner is not rendered, we have reached the end of
-    // the list of cards, so skip and disable firing the events
-    const target = this.find('.sk-spinner-list');
-    if (!target) {
-      this.$(container).off('scroll');
-      $(window).off(`resize.${this.data().listId}`);
-      return;
-    }
-
-    if (this.spinnerInView(container)) {
-      this.cardlimit.set(this.cardlimit.get() + InfiniteScrollIter);
-      Ps.update(container);
-    }
-  },
-
   canSeeAddCard() {
     return !this.reachedWipLimit() && Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly();
   },
@@ -661,3 +612,43 @@ BlazeComponent.extendComponent({
     }];
   },
 }).register('searchElementPopup');
+
+BlazeComponent.extendComponent({
+  onCreated() {
+    this.spinnerShown = false;
+    this.cardlimit = this.parentComponent().cardlimit;
+  },
+
+  onRendered() {
+    const spinner = this.find('.sk-spinner-list');
+
+    if (spinner) {
+      const options = {
+        root: null, // we check if the spinner is on the current viewport
+        rootMargin: '0px',
+        threshold: 0.25,
+      };
+
+      this.observer = new IntersectionObserver((entries) => {
+        entries.forEach((entry) => {
+          this.spinnerShown = entry.isIntersecting;
+          this.updateList();
+        });
+      }, options);
+
+      this.observer.observe(spinner);
+    }
+  },
+
+  onDestroyed() {
+    this.observer.disconnect();
+  },
+
+  updateList() {
+    if (this.spinnerShown) {
+      this.cardlimit.set(this.cardlimit.get() + InfiniteScrollIter);
+      window.requestIdleCallback(() => this.updateList());
+    }
+  },
+
+}).register('spinnerList');

+ 1 - 1
i18n/de.i18n.json

@@ -18,7 +18,7 @@
     "act-uncompleteChecklist": "unvollendete Checkliste __checklist__ der Karte __card__ auf der Liste __list__ bei Swimlane __swimlane__ an Board __board__",
     "act-addComment": "kommentierte eine Karte  __card__: __comment__ auf der Liste __list__ bei Swimlane __swimlane__ an Board __board__",
     "act-createBoard": "hat Board __board__ erstellt",
-    "act-createSwimlane": "created swimlane __swimlane__ to board __board__",
+    "act-createSwimlane": "erstellte Swimlane __swimlane__ auf Board __board__",
     "act-createCard": "erstellte Karte __card__ auf Liste __list__ bei Swimlane __swimlane__ an Board __board__",
     "act-createCustomField": "erstellte ein benutzerdefiniertes Feld __customField__ für Karte __card__ auf der Liste __list__ bei Swimlane __swimlane__ an Board __board__",
     "act-createList": "hat Liste __list__ zu Board __board__ hinzugefügt",

+ 4 - 4
i18n/es.i18n.json

@@ -17,10 +17,10 @@
     "act-completeChecklist": "completada la lista de verificación __checklist__ de la tarjeta __card__ de la lista __list__ del carril __swimlane__ del tablero __board__",
     "act-uncompleteChecklist": "no completada la lista de verificación __checklist__ de la tarjeta __card__ de la lista __list__ del carril __swimlane__ del tablero __board__",
     "act-addComment": "comentario en la tarjeta__card__: __comment__ de la lista __list__ del carril __swimlane__ del tablero __board__",
-    "act-createBoard": "creado el tablero __board__",
-    "act-createSwimlane": "created swimlane __swimlane__ to board __board__",
+    "act-createBoard": "creó el tablero __board__",
+    "act-createSwimlane": "creó el carril de flujo __swimlane__ en el tablero __board__",
     "act-createCard": "creada la tarjeta __card__ de la lista __list__ del carril __swimlane__ del tablero __board__",
-    "act-createCustomField": "creado el campo personalizado __customField__ en la tarjeta __card__ de la lista __list__ del carril __swimlane__ del tablero __board__",
+    "act-createCustomField": "creó el campo personalizado __customField__ en la tarjeta __card__ de la lista __list__ del carril __swimlane__ del tablero __board__",
     "act-createList": "añadida la lista __list__ al tablero __board__",
     "act-addBoardMember": "añadido el mimbro __member__ al tablero __board__",
     "act-archivedBoard": "El tablero __board__ se ha movido a Archivo",
@@ -45,7 +45,7 @@
     "activity-archived": "%s movido a Archivo",
     "activity-attached": "ha adjuntado %s a %s",
     "activity-created": "ha creado %s",
-    "activity-customfield-created": "creado el campo personalizado %s",
+    "activity-customfield-created": "creó el campo personalizado %s",
     "activity-excluded": "ha excluido %s de %s",
     "activity-imported": "ha importado %s a %s desde %s",
     "activity-imported-board": "ha importado %s desde %s",

+ 1 - 1
i18n/fr.i18n.json

@@ -18,7 +18,7 @@
     "act-uncompleteChecklist": "a rendu incomplet la checklist __checklist__ de la carte __card__ de la liste __list__ du couloir __swimlane__ du tableau __board__",
     "act-addComment": "a commenté la carte __card__ : __comment__ dans la liste __list__ du couloir __swimlane__ du tableau __board__",
     "act-createBoard": "a créé le tableau __board__",
-    "act-createSwimlane": "created swimlane __swimlane__ to board __board__",
+    "act-createSwimlane": "a créé le couloir __swimlane__ dans le tableau __board__",
     "act-createCard": "a créé la carte __card__ de la liste __list__ du couloir __swimlane__ du tableau __board__",
     "act-createCustomField": "a créé le champ personnalisé __customField__ pour la carte __card__ de la liste __list__ du couloir __swimlane__ du tableau __board__",
     "act-createList": "a ajouté la liste __list__ au tableau __board__",

+ 6 - 6
i18n/he.i18n.json

@@ -8,9 +8,9 @@
     "act-addedLabel": "התווית __label__ נוספה לכרטיס __card__ ברשימה __list__ למסלול __swimlane__ שבלוח __board__",
     "act-removeLabel": "התווית __label__ הוסרה מהכרטיס __card__ ברשימה __list__ מהמסלול __swimlane__ שבלוח __board__",
     "act-removedLabel": "התווית __label__ הוסרה מהכרטיס __card__ ברשימה __list__ מהמסלול __swimlane__ שבלוח __board__",
-    "act-addChecklist": "added checklist __checklist__ to card __card__ at list __list__ at swimlane __swimlane__ at board __board__",
+    "act-addChecklist": "נוספה רשימת מטלות __checklist__ לכרטיס __card__ ברשימה __list__ שבמסלול __swimlane__ בלוח __board__",
     "act-addChecklistItem": "נוסף פריט סימון __checklistItem__ לרשימת המטלות __checklist__ לכרטיס __card__ ברשימה __list__ במסלול __swimlane__ בלוח __board__",
-    "act-removeChecklist": "removed checklist __checklist__ from card __card__ at list __list__ at swimlane __swimlane__ at board __board__",
+    "act-removeChecklist": "הוסרה רשימת מטלות __checklist__ מהכרטיס __card__ ברשימה __list__ שבמסלול __swimlane__ בלוח __board__",
     "act-removeChecklistItem": "removed checklist item __checklistItem__ from checklist __checkList__ at card __card__ at list __list__ at swimlane __swimlane__ at board __board__",
     "act-checkedItem": "checked __checklistItem__ of checklist __checklist__ at card __card__ at list __list__ at swimlane __swimlane__ at board __board__",
     "act-uncheckedItem": "unchecked __checklistItem__ of checklist __checklist__ at card __card__ at list __list__ at swimlane __swimlane__ at board __board__",
@@ -18,9 +18,9 @@
     "act-uncompleteChecklist": "uncompleted checklist __checklist__ at card __card__ at list __list__ at swimlane __swimlane__ at board __board__",
     "act-addComment": "commented on card __card__: __comment__ at list __list__ at swimlane __swimlane__ at board __board__",
     "act-createBoard": "הלוח __board__ נוצר",
-    "act-createSwimlane": "created swimlane __swimlane__ to board __board__",
+    "act-createSwimlane": "נוצר מסלול __swimlane__ בלוח __board__",
     "act-createCard": "הכרטיס __card__ נוצר ברשימה __list__ במסלול __swimlane__ שבלוח __board__",
-    "act-createCustomField": "created custom field __customField__ to card __card__ at list __list__ at swimlane __swimlane__ at board __board__",
+    "act-createCustomField": "נוצר שדה בהתאמה אישית __customField__ בכרטיס __card__ שברשימה __list__ במסלול __swimlane__ שבלוח __board__",
     "act-createList": "הרשימה __list__ נוספה ללוח __board__",
     "act-addBoardMember": "החבר __member__ נוסף אל __board__",
     "act-archivedBoard": "הלוח __board__ הועבר לארכיון",
@@ -571,8 +571,8 @@
     "activity-added-label-card": "התווית ‚%s’ נוספה",
     "activity-removed-label-card": "התווית ‚%s’ הוסרה",
     "activity-delete-attach-card": "קובץ מצורף נמחק",
-    "activity-set-customfield": "set custom field '%s' to '%s' in %s",
-    "activity-unset-customfield": "unset custom field '%s' in %s",
+    "activity-set-customfield": "הגדרת שדה בהתאמה אישית ‚%s’ לערך ‚%s’ תחת %s",
+    "activity-unset-customfield": "ביטול הגדרת שדה בהתאמה אישית ‚%s’ תחת %s",
     "r-rule": "כלל",
     "r-add-trigger": "הוספת הקפצה",
     "r-add-action": "הוספת פעולה",

+ 4 - 4
i18n/pl.i18n.json

@@ -18,7 +18,7 @@
     "act-uncompleteChecklist": "Wycofano ukończenie wykonania listy __checklist__ na karcie __card__ na liście __list__ na diagramie czynności__ na tablicy __board__",
     "act-addComment": "Dodano komentarz na karcie __card__: __comment__ na liście __list__ na diagramie czynności __swimlane__ na tablicy __board__",
     "act-createBoard": "Utworzono tablicę __board__",
-    "act-createSwimlane": "created swimlane __swimlane__ to board __board__",
+    "act-createSwimlane": "utworzono diagram czynności __swimlane__ na tablicy __board__",
     "act-createCard": "Utworzono kartę __card__ na liście __list__ na diagramie czynności __swimlane__ na tablicy __board__",
     "act-createCustomField": "Utworzono niestandardowe pole __customField__ na karcie __card__ na liście __list__ na diagramie czynności__ na tablicy __board__",
     "act-createList": "Dodano listę __list__ do tablicy __board__",
@@ -31,7 +31,7 @@
     "act-importCard": "Zaimportowano kartę __card__ do listy __list__ na diagramie czynności __swimlane__ na tablicy __board__",
     "act-importList": "Zaimportowano listę __list__ na diagram czynności __swimlane__ do tablicy __board__",
     "act-joinMember": "Dodano użytkownika __member__ do karty __card__ na liście __list__ na diagramie czynności __swimlane__ na tablicy __board__",
-    "act-moveCard": "moved card __card__ at board __board__ from list __oldList__ at swimlane __oldSwimlane__ to list __list__ at swimlane __swimlane__",
+    "act-moveCard": "przeniesiono kartę __card__ na tablicy __board__ z listy __oldList__ na diagramie czynności __oldSwimlane__ na listę __list__ na diagramie czynności __swimlane__",
     "act-moveCardToOtherBoard": "Przeniesiono kartę __card__ z listy __oldList__ na diagramie czynności __oldSwimlane__ na tablicy __oldBoard__ do listy __listy__ na diagramie czynności __swimlane__ na tablicy __board__",
     "act-removeBoardMember": "Usunięto użytkownika __member__ z tablicy __board__",
     "act-restoredCard": "Przywrócono kartę __card__ na listę __list__ na diagram czynności__ na tablicy __board__",
@@ -571,8 +571,8 @@
     "activity-added-label-card": "dodał(a) etykietę '%s'",
     "activity-removed-label-card": "usunięto etykietę '%s'",
     "activity-delete-attach-card": "usunięto załącznik",
-    "activity-set-customfield": "set custom field '%s' to '%s' in %s",
-    "activity-unset-customfield": "unset custom field '%s' in %s",
+    "activity-set-customfield": "ustawiono niestandardowe pole '%s' do '%s' na '%s'",
+    "activity-unset-customfield": "wyczyszczono niestandardowe pole '%s' na '%s'",
     "r-rule": "Reguła",
     "r-add-trigger": "Dodaj przełącznik",
     "r-add-action": "Dodaj czynność",

+ 7 - 7
i18n/tr.i18n.json

@@ -17,17 +17,17 @@
     "act-completeChecklist": "completed checklist __checklist__ at card __card__ at list __list__ at swimlane __swimlane__ at board __board__",
     "act-uncompleteChecklist": "uncompleted checklist __checklist__ at card __card__ at list __list__ at swimlane __swimlane__ at board __board__",
     "act-addComment": "commented on card __card__: __comment__ at list __list__ at swimlane __swimlane__ at board __board__",
-    "act-createBoard": "created board __board__",
-    "act-createSwimlane": "created swimlane __swimlane__ to board __board__",
-    "act-createCard": "created card __card__ to list __list__ at swimlane __swimlane__ at board __board__",
+    "act-createBoard": "__board__ panosu oluşturuldu",
+    "act-createSwimlane": "__board__ panosuna __swimlane__ kulvarı oluşturuldu",
+    "act-createCard": "__board__ panosunun __swimlane__ kulvarının __list__ listesinin __card__ kartı oluşturuldu",
     "act-createCustomField": "created custom field __customField__ to card __card__ at list __list__ at swimlane __swimlane__ at board __board__",
     "act-createList": "added list __list__ to board __board__",
-    "act-addBoardMember": "added member __member__ to board __board__",
-    "act-archivedBoard": "Board __board__ moved to Archive",
+    "act-addBoardMember": "__board__ panosuna __member__ kullanıcısı eklendi",
+    "act-archivedBoard": "__board__ panosu Arşiv'e taşındı",
     "act-archivedCard": "Card __card__ at list __list__ at swimlane __swimlane__ at board __board__ moved to Archive",
     "act-archivedList": "List __list__ at swimlane __swimlane__ at board __board__ moved to Archive",
     "act-archivedSwimlane": "Swimlane __swimlane__ at board __board__ moved to Archive",
-    "act-importBoard": "imported board __board__",
+    "act-importBoard": "__board__ panosu içeriye aktarıldı",
     "act-importCard": "imported card  __card__ to list __list__ at swimlane __swimlane__ at board __board__",
     "act-importList": "imported list __list__ to swimlane __swimlane__ at board __board__",
     "act-joinMember": "added member __member__ to card __card__ at list __list__ at swimlane __swimlane__ at board __board__",
@@ -125,7 +125,7 @@
     "boardChangeTitlePopup-title": "Panonun Adını Değiştir",
     "boardChangeVisibilityPopup-title": "Görünebilirliği Değiştir",
     "boardChangeWatchPopup-title": "İzleme Durumunu Değiştir",
-    "boardMenuPopup-title": "Board Settings",
+    "boardMenuPopup-title": "Pano Ayarları",
     "boards": "Panolar",
     "board-view": "Pano Görünümü",
     "board-view-cal": "Takvim",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "wekan",
-  "version": "v2.55.0",
+  "version": "v2.56.0",
   "description": "Open-Source kanban",
   "private": true,
   "scripts": {

+ 2 - 2
sandstorm-pkgdef.capnp

@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
     appTitle = (defaultText = "Wekan"),
     # The name of the app as it is displayed to the user.
 
-    appVersion = 257,
+    appVersion = 258,
     # Increment this for every release.
 
-    appMarketingVersion = (defaultText = "2.55.0~2019-03-25"),
+    appMarketingVersion = (defaultText = "2.56.0~2019-03-27"),
     # Human-readable presentation of the app version.
 
     minUpgradableAppVersion = 0,