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

fix: Pass the right arguments to the cozy-bar #2395

Merged
merged 1 commit into from
Jul 5, 2021
Merged

Conversation

Crash--
Copy link
Contributor

@Crash-- Crash-- commented Jul 5, 2021

We decided to use data-cozy={{}} to get access to
the variables injected by the cozy-stack.

By removing data-cozy-*, cozy-bar was lost since
the bar will look into cozy-data-appslug to detect
the slug of the app. Since the bar can't do that
anymore, we need to pass all the args during the
init phase.

We decided to use data-cozy={{}} to get access to
the variables injected by the cozy-stack.

By removing data-cozy-*, cozy-bar was lost since
the bar will look into cozy-data-appslug to detect
the slug of the app. Since the bar can't do that
anymore, we need to pass all the args during the
init phase.
@Crash-- Crash-- requested a review from JF-Cozy July 5, 2021 13:05
@JF-Cozy
Copy link
Contributor

JF-Cozy commented Jul 5, 2021

Est-ce qu'il ne faudrait pas plutôt patcher cozy-bar dans ce cas ? Sinon ça voudrait dire qu'on a le souci pour toutes les app non ?

@Crash--
Copy link
Contributor Author

Crash-- commented Jul 5, 2021

Est-ce qu'il ne faudrait pas plutôt patcher cozy-bar dans ce cas ? Sinon ça voudrait dire qu'on a le souci pour toutes les app non ?

We can patch the bar. But in fact, I prefer having an explicit initialization of the cozy-bar. Relying on a data-structure that we don't manage is very... dangerous.

@JF-Cozy
Copy link
Contributor

JF-Cozy commented Jul 5, 2021

Relying on a data-structure that we don't manage is very... dangerous.

C'est à dire ?

Je pense qu'une petite issue pour corriger getAppNodeDataSet de cozy-bar https://github.com/cozy/cozy-bar/blob/master/src/dom.js#L4 est quand même nécessaire non ?

@Crash--
Copy link
Contributor Author

Crash-- commented Jul 5, 2021

Je pense qu'une petite issue pour corriger getAppNodeDataSet de cozy-bar https://github.com/cozy/cozy-bar/blob/master/src/dom.js#L4 est quand même nécessaire non ?

L'idée étant de supprimer ces défaults et d'obliger l'app qui consomme la bar à initialiser tout ce qu'il faut. Explicit is way better than implicit in that case.

@Crash-- Crash-- merged commit dabef0f into master Jul 5, 2021
@Crash-- Crash-- deleted the fix/CozyBarInit branch July 5, 2021 14:08
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.

2 participants