Skip to content

Commit

Permalink
Added a DiscussionsSection.vue in AnalysisView components, updated th…
Browse files Browse the repository at this point in the history
…e analysis model to return an injected discussion object, and updating the styling of the buttons to match figma more closely
  • Loading branch information
JmScherer committed Sep 22, 2023
1 parent 1d9e35b commit 378460a
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 5 deletions.
50 changes: 50 additions & 0 deletions frontend/src/components/AnalysisView/DiscussionSection.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<template>
<div class="rosalution-section-container">
<input type="checkbox" v-bind:id="section_toggle" />
<div class="rosalution-section-header">
<h2 class="rosalution-section-header-text">Discussion</h2>
<span class="rosalution-section-center" data-test="header-datasets"/>
<button class="primary-button new-discussion-button">New Discussion</button>
<label class="collapsable-icon" v-bind:for="section_toggle">
<font-awesome-icon icon="chevron-down" size="lg"/>
</label>
</div>
<div class="rosalution-section-seperator"></div>
<div class="section-content">
Content
</div>
</div>
</template>

<script>
export default {
name: "",

Check failure on line 21 in frontend/src/components/AnalysisView/DiscussionSection.vue

View workflow job for this annotation

GitHub Actions / nodejs-ci (16.2)

Expected indentation of 2 spaces but found 4

Check failure on line 21 in frontend/src/components/AnalysisView/DiscussionSection.vue

View workflow job for this annotation

GitHub Actions / nodejs-ci (16.2)

Strings must use singlequote

Check failure on line 21 in frontend/src/components/AnalysisView/DiscussionSection.vue

View workflow job for this annotation

GitHub Actions / nodejs-ci (16.2)

Component name "" should always be multi-word
props: {

Check failure on line 22 in frontend/src/components/AnalysisView/DiscussionSection.vue

View workflow job for this annotation

GitHub Actions / nodejs-ci (16.2)

Expected indentation of 2 spaces but found 4
header: {

Check failure on line 23 in frontend/src/components/AnalysisView/DiscussionSection.vue

View workflow job for this annotation

GitHub Actions / nodejs-ci (16.2)

Expected indentation of 4 spaces but found 8
type: String,

Check failure on line 24 in frontend/src/components/AnalysisView/DiscussionSection.vue

View workflow job for this annotation

GitHub Actions / nodejs-ci (16.2)

Expected indentation of 6 spaces but found 12
},

Check failure on line 25 in frontend/src/components/AnalysisView/DiscussionSection.vue

View workflow job for this annotation

GitHub Actions / nodejs-ci (16.2)

Expected indentation of 4 spaces but found 8
},

Check failure on line 26 in frontend/src/components/AnalysisView/DiscussionSection.vue

View workflow job for this annotation

GitHub Actions / nodejs-ci (16.2)

Expected indentation of 2 spaces but found 4
data() {

Check failure on line 27 in frontend/src/components/AnalysisView/DiscussionSection.vue

View workflow job for this annotation

GitHub Actions / nodejs-ci (16.2)

Expected indentation of 2 spaces but found 4
return

Check failure on line 28 in frontend/src/components/AnalysisView/DiscussionSection.vue

View workflow job for this annotation

GitHub Actions / nodejs-ci (16.2)

Expected indentation of 4 spaces but found 8
}
}
</script>

<style scoped>
.new-discussion-button {
margin-bottom: 10px;
margin-right: 10px
}
.collapsable-icon {
color: var(--rosalution-grey-200);
cursor: pointer;
}
input[type="checkbox"] {
display: none;
}
</style>
15 changes: 15 additions & 0 deletions frontend/src/models/analyses.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ export default {
const baseUrl = '/rosalution/api/';
const urlQuery = 'analysis/' + analysisName;
const body = await Requests.get(baseUrl + urlQuery);

body["discussions"] = [{
"postId": "",
"client_id": "",
"datetimestamp": "",
"content": "",
"attachments": [],
"replies": [{
"client_id": "",
"datetimestamp": "",
"content": "",
"attachments": []
}]
}]

return body;
},

Expand Down
14 changes: 9 additions & 5 deletions frontend/src/styles/rosalution.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ html {
color: var(--rosalution-purple-300);
font-weight: 700;
font-size: 1.125rem;
height: 1.75rem;
width: 7rem;
padding-top: 0.6875rem;
padding-bottom: 0.6875rem;
padding-left: 1.75rem;
padding-right: 1.75rem;
border: none;
border-radius: var(--button-border-radius);
cursor: pointer;
Expand All @@ -49,8 +51,10 @@ html {
font-family: "Proxima Nova", sans-serif;
font-weight: 700;
font-size: 1.125rem;
height: 1.75rem;
width: 7rem;
padding-top: 0.6875rem;
padding-bottom: 0.6875rem;
padding-left: 1.75rem;
padding-right: 1.75rem;
border-color: var(--rosalution-black);
border-radius: var(--button-border-radius);
border-style: solid;
Expand Down Expand Up @@ -107,7 +111,7 @@ html {

.rosalution-section-header {
display: flex;
align-items: flex-end;
align-items: center;
}

.rosalution-header-right-icons {
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/views/AnalysisView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
@update-image="this.updateSectionImage"
@update:content-row="this.onAnalysisContentUpdated"
/>
<DiscussionSection
id="Discussion_Section"
/>
<SupplementalFormList
id="Supporting_Evidence"
:attachments="this.attachments"
Expand Down Expand Up @@ -68,6 +71,7 @@ import NotificationDialog from '@/components/Dialogs/NotificationDialog.vue';
import Toast from '@/components/Dialogs/Toast.vue';
import SupplementalFormList from '@/components/AnalysisView/SupplementalFormList.vue';
import SaveModal from '@/components/AnalysisView/SaveModal.vue';
import DiscussionSection from '../components/AnalysisView/DiscussionSection.vue';
import inputDialog from '@/inputDialog.js';
import notificationDialog from '@/notificationDialog.js';
Expand All @@ -87,6 +91,7 @@ export default {
Toast,
SupplementalFormList,
SaveModal,
DiscussionSection
},
props: ['analysis_name'],
data: function() {
Expand Down

0 comments on commit 378460a

Please sign in to comment.