etsy / morgue

post mortem tracker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"What happened?" field does not appear when editing

marcesher opened this issue · comments

After creating a new postmortem and then clicking to edit, the "What happened?" field does not appear for me. I don't see any obvious reason for this in Chrome Dev Tools. Images of screen and Dev Tools HTML are attached.

Thanks for any advice.

screen shot 2015-07-23 at 8 19 20 am

screen shot 2015-07-23 at 8 17 27 am

Poking around the code, it seems that summary.js isn't being pulled in. I'm not sure how it's intended to be included in the page, but adding this bit to views/content/edit.php did the trick:

<script type="text/javascript" src="/features/summary/js/summary.js"></script>

Since that's unlike all the other includes on that page, it seems the more obvious solution is to move summary.js out of the features directory and into the primary assets directory. However, I don't know the context so await your decision. For now, this works for me.

In your config.json file have you specified custom_js_assets for the the summary feature?
That should instruct morgue to load in when the summary view is loaded.

{    "name": "summary",
     "enabled": "on",
     "custom_js_assets": ["summary.js"]
}

Thanks @mmercedes
No, I didn't do that, but I will.

It is curious, though: I'd think that summary would be core, not an extra feature, and would consequently be loaded in by default, similar to how the others are. In addition, since that bit of config you have in there is not in the example.json file, that means that out of the box, morgue will not actually work as expected for anyone until they figure out that's how to do it. It's a curious design choice, is all.

Thanks again.

You're right that there is some debate that could be had about what counts as the core of morgue features, but from what I've contributed so far, I've taken the approach of considering everything a feature that can be turned on/off. I also just updated the example.json to mirror a config that is currently working for me with all features enabled. Sorry for the confusion.

@mmercedes Fair enough.

Thanks a lot for adding that to example.json!