CSS not being loaded in admin GUI of Stash plugin

Tomas Bjerre February 27, 2015

I'm struggling with getting the CSS to load so that I can customize the admin GUI of my Stash plugin. The CSS is currently not loading at all, here is my repo:

https://github.com/tomasbjerre/simple-stash-commit-checker

What am I doing wrong?

Also, I cant find any documentation on these AUI SOY templates. And I have been googling alot around the subject. I am looking for something like this but with running examples implemented with AUI and SOY. Is there any such documentation?

Do I have to use SOY or is there any alternative way of creating the admin GUI? To me it seems SOY adds nothing but unncecessary complexity.

 

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Mibex_Software
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2015

If you don't see the rendered SOY template, you might want to have a look at your console where the host application (i.e. Stash) is running. There, you should normally find some kind of exception (SOY template errors) that gives you a hint about the cause of the error (e.g., if you haven't passed a mandatory parameter to a SOY template).

AUI SOY templates are nowhere documented in detail - at least as far as I know. You might want to have a look at the source code of the form templates to see what parameters they expect and how they are implemented:

https://bitbucket.org/atlassian/aui/src/b749eeff2d431902cf58ed56093cd727a48ef1fa/src/soy/form.soy?at=master

 

Hope this helps.

Cheers,

Michael

 

 

Tomas Bjerre February 27, 2015

Sorry "It" is loading but "The CSS" is not, I edited the question. I can find the hook in Stash and open the GUI. It gets rendered. I want the text area:s to have CSS like: "max-width: 100%". Since the CSS-file is not loading I cannot set that rule.

Mibex_Software
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2015

You have defined a custom context (<context>sscc</context>) for the web-resource that contains the CSS definition. Normally, you can request a context for rendering like this pageBuilderService.assembler().resources().requireContext("sscc") but in the case of a Stash repository hook, I don't think this is possible. I would replace the context with <context>stash.page.repository.settings.hooks</context>

Tomas Bjerre February 27, 2015

Thanks =) That solved the issue. And if anyone else has this problem, here is the commit that fixed it: https://github.com/tomasbjerre/simple-stash-commit-checker/commit/1076b51ed1c67afbcbebc7ec38fa594ac24ab79d

0 votes
Jennifer March 2, 2015

SPAM

TAGS
AUG Leaders

Atlassian Community Events