Skip to content

Commit

Permalink
feat: ✨ Links to openfeedbacks (#24)
Browse files Browse the repository at this point in the history
* feat: ✨ Links to openfeedbacks

* Update src/views/pages/agenda.js

Co-authored-by: Thomas DA ROCHA <[email protected]>

* Update src/views/pages/agenda.js

Co-authored-by: Thomas DA ROCHA <[email protected]>

* feat: 💄 Update UI Buttons

* feat: ✨ add feedback link in session

* test: ✅ add test for openfeedbacks

---------

Co-authored-by: Thomas DA ROCHA <[email protected]>
  • Loading branch information
gouz and taorepoara authored Jun 3, 2023
1 parent eee438b commit 5956534
Show file tree
Hide file tree
Showing 5 changed files with 1,365 additions and 8 deletions.
55 changes: 55 additions & 0 deletions src/openfeedbacks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
export const openfeedbacks = {
"l_art_du_DeeJaying_par_la_pratique": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/19A5DYzQiX9KGabiRZIK",
"on_vit_deja_dans_un_monde_federe": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/2TBNNk9w1gEofQwDufBw",
"vous_pouvez_venir":"https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/61uJyxeCpCUfLVZm047f",
"naviguer_et_coder_comment_on_fait":"https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/68Z2WwVSJ9oP1OfXXyeJ",
"recits_d_epouvante_mlops": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/KhncUojNDXT7UoYXKKkU",
"mobkky_le_mob_applique_au_molkky": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/LJpjuxKkN21A7R9ZK5Gh",
"la_pull_request_de_l_horreur": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/MwwBXttfFJu536CUNnnj",
"imager_materialiser_sa_pensee": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/RD9AzFTXlAdwmgYRRAQW",
"esprit_de_famille": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/WCZHpv6LP44b6zDqaoOH",
"revivez_la_cryptographie_de_nos_ancetres" : "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/aFeNTZTqEjW9A6k1Wi9j",
"de_la_tablette_d_argile_a_ChatGPT": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/bs3lWkIIecLILS6myXzI",
"le_guide_du_voyageur": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/gZd0mh3pY9Xz6Gm6ZdPb",
"un_scrum_master_en_or": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/kiMZpmyJDksQC0mMuMtu",
"il_etait_une_fois_un_arbre_qui_parle": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/nMWG2SnTVYe7knR1nI0b",
"javascript_une_histoire": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/pXwMGMSK8wpMIMoYSayU",
"mini_golf_pour_une_accessibilite": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/qMkXhNHmZodluBZ28qzs",
"a_la_decouverte_du_developpement_mobile": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/r0T8dpcqSh3TTZB16kbS",
"avant_je_supprimai_des_bugs": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/ujEFnU88nGa9WtyAfH6m",
"dessines_moi_rust": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/2r8HzqvVuPvvTmyoYcaw",
"intelligence_artificielle_expliquee_en_20_minutes": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/3wCEYJZ26BOlFf11IN2W",
"keynote_jeudi_matin": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/96yF0z9sXKy6rMKEWxzY",
"creer_des_objets_3D_avec_du_code": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/F9O3wzs3Ozcy85o8tA1R",
"pour_eviter_le_dirty_recruiting": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/VvZ7IMEHBES2mxu7aUut",
"construire_soi_meme_son_clavier_mecanique": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/dGsAppCLuZEcEoJC8wDL",
"do_not_track_me": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/er3gOYwdeNYhxYyvagy9",
"event_driven_qu_est_ce_donc": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/hb3tHXpRWQ7VX3mpTRAA",
"the_developer_portal": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/iCPztz0B0cnDrSjh0W75",
"bienvenue_dans_ma_zone_d_inconfort": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/iUlTdaw6fdjBn8rNeX6J",
"d_un_orchestre_fige_a_un_joli_ballet": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/ClzTSd7EVr4Xk2JORJH2",
"comment_hacker_vos_applications_mobiles": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/D20sCMnCosZbXVpAW0UY",
"corn_hole_2_turbo": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/GCCeIdmI51ks1xgmUnAb",
"apprenons_ensemble": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/SeQxd4lYfrxRFUrsy6CN",
"ivre_et_au_chomage": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/b5p4i70CkZITptgbncA3",
"les_7_vies_d_une_qa_analyst": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/cb51m7ezLrNA0Z8c9Cyo",
"FrankenPHP": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/ivtZFdYVkOKV2AKAra6V",
"sous_le_capot": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-15/tv3AjDQ68CjKzJ2vZXpu",
"astuces_pour_parler": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/1Mdb9pDSF762rn2cnOmJ",
"escape_camp_part_1": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/IlrUX0uq2wKSZ68M8Zbd",
"et_si_on_arretait_de_basher_les_esn": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/XvdSUbIxv4P3la7gqLGT",
"passez_moins_de_temps_a_attendre_la_ci": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/Yg5GDgRoYZvLdzxEwEh8",
"programmons_ensemble":"https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/mRDXnlSWhbi6rlRXCr7W",
"dis_papa_c_est_quoi_impression_3D": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/ooapxX5MSmyPIlkSyhZY",
"maitrise_ton_apprentissage": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/v5GA7B22rm635z7ejjzO",
"yagni_kiss_and_dry": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/00y0OQ5oiPocfOpsCiYE",
"cette_annee_retombez_amoureux_de_CSS": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/1dds5Nadspxf0BKxzbB0",
"wolfy": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/lt56pyvfts3HXV4oXUI2",
"vite_une_nouvelle_ere_de_tooling_front": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/RIGv9yJGOyk5yUhgVEk8",
"comment_gerer_des_journees_de_35h": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/T62PjshxGvgrQ6EPcWMv",
"creer_sa_propre_vm_avec_compilation_jit_pour_les_nuls": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/eOM2rDa4o3RA9D6W2V0C",
"speech_to_text": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/q4JmxBMtc3j85NAsCdcx",
"escape_camp_part_2": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/46nmW7uQ7j3AjJa70PDN",
"keynote_vendredi_soir": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/ELMyhOkyz6pmvU8GXqMt",
"keynote_vendredi_matin": "https://openfeedback.io/tY2sBMJlCOeyH0kdoCIu/2023-06-16/AoIXs1Z7HK4w02wVQJqy"
};
27 changes: 21 additions & 6 deletions src/views/pages/agenda.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Actionable, colors, Container, Flex, Flexible, Icon, Image, padding, Te
import { days, rooms, sessions, speakers } from "../../camping-data.js";
import { Favorite } from "../../classes/Favorite.js";
import { listeners, views } from "../../index.gen.js";
import { openfeedbacks } from "../../openfeedbacks.js";

/**
* @param {Favorite[]} param0
Expand Down Expand Up @@ -91,12 +92,26 @@ function sessionCard(session, isFavorite) {
Text(rooms[session.attributes.room].name),
])
.direction("vertical"),
Actionable(
Icon("local_fire_department")
.color(isFavorite ? colors.LenraColors.yellowPulse : colors.Colors.black)
.style(isFavorite ? "rounded" : "outlined")
)
.onPressed(listeners.toggleFavorite, { session: session.attributes.key }),
Flex(
[
Actionable(
Container(
Icon("local_fire_department")
.color(isFavorite ? colors.LenraColors.yellowPulse : colors.Colors.black)
.style(isFavorite ? "rounded" : "outlined")
)
.padding(padding.symmetric(16, 8))
).onPressed(listeners.toggleFavorite, { session: session.attributes.key }),
Actionable(
Container(
Icon("forum")
.color(colors.Colors.black)
.style("rounded")
)
.padding(padding.symmetric(16, 8))
).onPressed("@lenra:navTo", { path: openfeedbacks[session.attributes.key] }),
]
).spacing(8),
]
)
.fillParent(true)
Expand Down
11 changes: 10 additions & 1 deletion src/views/pages/session.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
import { Actionable, Flex, Flexible, Text, View, Wrap } from "@lenra/components";
import { Actionable, Container, Flex, Icon, Text, View, Wrap, colors, padding } from "@lenra/components";
import { days, rooms, sessions, speakers } from "../../camping-data.js";
import { views } from "../../index.gen.js";
import { buildContentChildren } from "../../utils/contentDescriber.js";
import { openfeedbacks } from "../../openfeedbacks.js";

export default function (_data, /* _props, */{ context: { pathParams } }) {
const session = sessions[pathParams.key];
return Flex([
header(session),
...body(session),
...speakerList(session),
Actionable(
Container(
Icon("forum")
.color(colors.Colors.black)
.style("rounded")
)
.padding(padding.symmetric(16, 8))
).onPressed("@lenra:navTo", { path: openfeedbacks[session.attributes.key] }),
])
.direction("vertical")
.spacing(16)
Expand Down
Loading

0 comments on commit 5956534

Please sign in to comment.