Code Monkey home page Code Monkey logo

Comments (10)

goldoraf avatar goldoraf commented on July 28, 2024 1

Why not just add a prop to the bar's API? Developers should be able to customize the bar easily, and resorting to the manifest for that seems confusing.

from cozy-bar.

gregorylegarec avatar gregorylegarec commented on July 28, 2024 1

I suggest to use by default the editor from the registry as "appNamePrefix" property for Cozy-Bar, as appEditor has not the same meaning than prefix, and contributor should want to customize the prefix, not the editor.

I hope I am clear.

from cozy-bar.

y-lohse avatar y-lohse commented on July 28, 2024

I'm afraid I don't understand the initial problem.

You want to have something else than the editor's name as a prefix in the cozy-bar? If so, what use cases are there for this? Or what are the confusing parts in the cozy-store?
You want to add a app_prefix field, but where? In the manifest? In the cozy-bar options?

from cozy-bar.

CPatchane avatar CPatchane commented on July 28, 2024

Oops sorry, yeah I meant to add a new field in the manifest for this case. My problem is that all application which will be published by us will be under the Cozy editor. But not all of them will want to have the prefix displayed in the bar. In the store we can't know if have to display it or not and, more generally, I don't think we (we or other developpers) will always want to display the editor as the application prefix automatically.

from cozy-bar.

CPatchane avatar CPatchane commented on July 28, 2024

My point is that the editor and the prefix we want to display near the application name in the cozy-bar should not be bound. We could want to display a brand or something which is clearly different from the editor name.
The cozy-store won't use the editor to display Cozy as the application name prefix anymore, it will check for a name_prefix property in the application manifest instead. For the bar, since it's an information provided by the stack in the HTML file, it can be done progressively. What about a data-cozy-app-editor={{.namePrefix}} HTML attribute which provided this property? The current app editor can still be here and be used if needed for some apps.
To answer @goldoraf, it's not just about the bar even if I opened this issue in the cozy-bar repository (I did that because it's mainly used here for now).

from cozy-bar.

y-lohse avatar y-lohse commented on July 28, 2024

Is the editor field used for anything else, beside prefixing the name? IIRC it was introduced specifically for this.
As @gregorylegarec suggests, using the editor by default and leaving name_prefix as a possible override sounds sensible.

from cozy-bar.

CPatchane avatar CPatchane commented on July 28, 2024

I think, at the beginning, it was introduced to be used as prefix in the cozy-bar. Now it will be correctly used to match the editor used to publish the application in the registry.
If we use the editor by default, how will you know that you want to use or not the editor as prefix?

from cozy-bar.

y-lohse avatar y-lohse commented on July 28, 2024

If we use the editor by default, how will you know that you want to use or not the editor as prefix?

It would be there by default, and if you don't want it you set the prefix to an empty string. Probably?
I still don't know of any app that does not want the editor-prefix, so I feel we should optimize for that use case.

from cozy-bar.

CPatchane avatar CPatchane commented on July 28, 2024

I still don't know of any app that does not want the editor-prefix, so I feel we should optimize for that use case.

Konnectors are considered as applications by the registry (just the type is different) but published using the same Cozy editor. We don't want to display the prefix for them in the cozy-store.

I just want to make things simpler. If we want a prefix, we use it. If we want that prefix to be the same than the editor, so we define it as the same value as the editor. It should be clear.

from cozy-bar.

CPatchane avatar CPatchane commented on July 28, 2024

Fixed by the version v5.0.0

from cozy-bar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.