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

Pc 32405 rpa import book club chronicles #15253

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

rpaoloni-pass
Copy link
Contributor

But de la pull request

Ticket Jira (ou description si BSR) : https://passculture.atlassian.net/browse/PC-32405

Vérifications

  • J'ai écrit les tests nécessaires
  • J'ai mis à jour le fichier des plans de tests du portail pro si nécessaire
  • J'ai mis à jour la liste des routes et des titres de pages du portail pro si j'en ai rajouté/modifié ou supprimé une.
  • J'ai relu attentivement les migrations, en particulier pour éviter les locks, et je préviens les équipes Shérif et Data
  • J'ai ajouté des screenshots pour d'éventuels changements graphiques

@rpaoloni-pass rpaoloni-pass force-pushed the pc-32405-rpa-import-book-club-chronicles branch from 0d229c8 to ac5527e Compare November 27, 2024 15:15
@rpaoloni-pass rpaoloni-pass force-pushed the pc-32405-rpa-import-book-club-chronicles branch from ac5527e to ac56704 Compare November 27, 2024 15:28
@@ -1,20 +1,20 @@
{% macro collapsable_text(id, short, long) %}
<div class="pc-display-selector"
data-pc-input-name="name-{{ id }}">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Petit screenshot ?
Je suis une personne simple, je vois des modifs de HTML, je demande un screenshot 😉

Copy link
Contributor Author

@rpaoloni-pass rpaoloni-pass Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ça ne change rien a l'affichage ça résout juste un bug dans le js (le texte qui est étendu par défaut au lieu d'être coupé par défaut)

@@ -53,3 +53,24 @@ def wrapper(*args: typing.Any, **kwargs: typing.Any) -> typing.Any:
return result

return wrapper


def log_cron(func: typing.Callable) -> typing.Callable:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi on utilise pas log_cron_with_transaction ici ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parce que cette fonction est fondamentalement incompatible avec @atomic que j'utilise plus loin

(en gros si on met du atomic dans un log_cron_with_transaction il ets forcement rollback a la fin

Comment on lines +335 to +339
-- Anonymize redactor for table chronicle
UPDATE "chronicle"
SET
"email" = 'chronicle' || "id" || '@anonymized.email',
"firstName" = pg_temp.fake_first_name(id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

api/src/pcapi/connectors/typeform.py Outdated Show resolved Hide resolved
form_id=constants.BOOK_CLUB_FORM_ID,
num_results=constants.IMPORT_CHUNK_SIZE,
sort="submitted_at,asc",
since=last_chronicle.dateCreated if last_chronicle else None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point de vigilance : attention, cela signifie qu'on ne doit pas ajouter de nouvelles chroniques en dehors de ce chemin, car on ignorerait alors toutes celles ajoutées sur Typeform et précédant la date d'une chronique ajoutée par cet autre biais.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

en effet mais je ne vois pas trop comment faire autrement. L'argument after de typeform ne supporte pas l'argument sort (et du coup il ne sert a rien)

api/src/pcapi/core/chronicles/api.py Outdated Show resolved Hide resolved
api/src/pcapi/core/chronicles/api.py Show resolved Hide resolved
api/src/pcapi/core/chronicles/api.py Outdated Show resolved Hide resolved
api/tests/core/chronicles/test_api.py Outdated Show resolved Hide resolved
api/tests/core/chronicles/test_api.py Outdated Show resolved Hide resolved
Comment on lines +49 to +63
if($selector.dataset.pcSaveState === "true") {
const selectedValue = localStorage.getItem($selector.dataset.pcInputName)
this.#inputInSelector($selector).forEach(($input) => {
if ($input.value === selectedValue){
$input.checked = true
}
})
} else {
localStorage.removeItem($selector.dataset.pcInputName)
}
}
#saveConfiguration = ($selector) => {
localStorage.setItem($selector.dataset.pcInputName, this.#getSelectedValue($selector))
if($selector.dataset.pcSaveState === "true") {
localStorage.setItem($selector.dataset.pcInputName, this.#getSelectedValue($selector))
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je ne devine pas dans quelle page est le bug ni si ça a un rapport avec le BookClub.
Quel est le bug ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le bug est sur le repliement du texte sur la page de liste des chroniques. Il retenait les chroniques pliées/dépliées ce que je trouve être un comportement peu intuitif. Les modifications de ce commit font que:

  1. a chaque fois qu'on arrive sur la page toutes les chroniques sont dans le même état
  2. que l'etat par defaut soit l'etat plié

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ce n'est pas forcément le sujet de ce ticket mais... Comment un utilisateur du BO devine-t-il qu'il faut cliquer pour déplier ? Question UX à poser :)
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

les points de suspension me paraissaient suffisant mais si ça ne l'est pas pour toi, il faut en effet en parler niveau UX :)

@rpaoloni-pass rpaoloni-pass force-pushed the pc-32405-rpa-import-book-club-chronicles branch from ac56704 to 58dc55a Compare December 2, 2024 16:13
@rpaoloni-pass rpaoloni-pass force-pushed the pc-32405-rpa-import-book-club-chronicles branch from 58dc55a to 5f83c2e Compare December 2, 2024 16:18
@rpaoloni-pass rpaoloni-pass merged commit 22bc5bf into master Dec 4, 2024
23 of 24 checks passed
@rpaoloni-pass rpaoloni-pass deleted the pc-32405-rpa-import-book-club-chronicles branch December 4, 2024 09:30
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.

3 participants