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

Enhance the new <@unbundled-resources@/> tag #1174

Open
dchambers opened this issue Jan 15, 2015 · 5 comments
Open

Enhance the new <@unbundled-resources@/> tag #1174

dchambers opened this issue Jan 15, 2015 · 5 comments

Comments

@dchambers
Copy link
Contributor

For what appear to be theoretical and unproven reasons, we now have the ability to request 'unbundled-resources' at any level. At present however, the <@unbundled-resources@/> tag only allows you to load resources local to where the tag has been used, for example:

  • Within an aspect index page it loads unbundled-resources from the aspect.
  • Within a bladeset workbench page it loads unbundled-resources from the bladeset workbench.
  • Within a blade workbench page it loads unbundled-resources from the blade workbench.

At present, the only time I've seen the <@unbundled-resources@/> tag used from a workbench page, it was used to load resources from the default aspect, and so was preceded by ../../../, like so:

`../../../<@unbundled-resources@/>`

Do people have an opinion on how this tag should work in general, and what the attributes it should support? @james-shaw-turner / @andyberry88 / @thecapdan / @janhancic / @bit-shifter / @LukePage?

@dchambers
Copy link
Contributor Author

@dogoku & @thecapdan have just requested the ability to refer to an image from HTML within a BRJS conformant library, but without using CSS to refer to it, and at present this would require them to do the following to make it work:

  1. Write some JavaScript that decorates the page once it's been loaded.
  2. Look at our source code to figure out what path to use.
  3. Pass that path to require('service!br.app-meta-service').getVersionedBundlePath() to have the version correctly prefixed to it.

@andyberry88 / @ioanalianabalas, do you both agree that this is not reasonable, and that the <@unbundled-resources@/> tag should allow people to do this more simply, and that this should be prioritized for 1.1?

@ioanalianabalas
Copy link
Contributor

@dchambers, I agree with you that this should be a functionality provided by the <@unbundled-resources@/> tag. I actually think that this would be a very reasonable scenario for which we should enhance it.

@andy-berry-dev
Copy link
Member

We've already got "implicitly add bundle path tokens to "JNDI" token filter" (#775) to look at it and I'd suggest this is a duplicate or very related to that. We currently have some special logic in the XML and HTML content plugins to replace the @bundlePath@ tokens. IMO it would seem sensible to make this more generic so tag plugins (or similar) can be used in most/any resource and have a pluggable mechanism for this.

This is also loosely related to the static tokens work we've also said we'd like to do for 1.1 (#749).

@dchambers
Copy link
Contributor Author

@andyberry88, it's not obvious to me how this issue relates to #775. Perhaps we can discuss this tomorrow after the stand-up?

@andy-berry-dev
Copy link
Member

After discussions it looks like I've misread this - this issue only relates to the tag plugins in index.html and the ability to reference unbundled-resources at any level from index.html.

It is loosely related to #775 in that #775 would add the ability to use this kind of tag inside HTML templates.

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

No branches or pull requests

3 participants