-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Feature note component #538
Open
miltonbsn
wants to merge
23
commits into
main
Choose a base branch
from
feature/component-notes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
915456f
Start note component definition
miltonbsn c257807
Change input to text area
miltonbsn 2a45f31
Replace <input /> with <textarea>
idmarjr 6289bbd
Update <label> details
idmarjr 7404734
User note color selector markup + styles
idmarjr 7009c75
Update note color translations
idmarjr 5bbac78
Define :focus-within to improve acessibility
idmarjr a449592
Force width / height instead of use inste
idmarjr 9229bc3
Add HEX values as comment for note colors
idmarjr 4812878
Tweak some values for note shape (Experimenting)
idmarjr 16e314c
New note component setup
miltonbsn 2a2acd1
Merge notes
miltonbsn 08d8f86
Create custom joint note componente
miltonbsn c4b8ea8
Delete custom note
miltonbsn d1c1bb1
Create new Note Componente
miltonbsn 4012c01
Add new Note to conceptual model
miltonbsn bafd2cd
Create noteEditor component
miltonbsn 8d21e69
Add notes to logic model
miltonbsn 60e3c66
Allow note link on logic model
miltonbsn d2c7405
Prevent logic element pdate error
miltonbsn a193cbc
Allow note link on conceptual model
miltonbsn 487a218
Update default color
miltonbsn 987bfb1
Fix format
miltonbsn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<!-- ########## start notes ######## --> | ||
<div class="form-group"> | ||
<label for="user-note">{{ 'Note' | translate }}</label> | ||
<textarea | ||
id="user-note" | ||
class="form-control user-note-input" | ||
data-ng-model="$ctrl.selected.value" | ||
ng-change="$ctrl.updateNoteText($ctrl.selected.value)" | ||
autofocus | ||
></textarea> | ||
</div><!-- End .form-group --> | ||
<div class="form-group"> | ||
<label for="note-color">{{'Color' | translate }}</label> | ||
<ul class="note-color-list"> | ||
<li> | ||
<label for="color-gray">{{'Gray' | translate }}</label> | ||
<input | ||
type="radio" | ||
name="note-color-option" | ||
id="color-gray" | ||
value="color-gray" | ||
ng-click="$ctrl.updateNoteColor('#afbccf')" | ||
/> | ||
</li> | ||
<li> | ||
<label for="color-salmon">{{'Salmon' | translate }}</label> | ||
<input | ||
type="radio" | ||
name="note-color-option" | ||
id="color-salmon" | ||
value="color-salmon" | ||
ng-click="$ctrl.updateNoteColor('#fca397')" | ||
/> | ||
</li> | ||
<li> | ||
<label for="color-orange">{{'Orange' | translate }}</label> | ||
<input | ||
type="radio" | ||
name="note-color-option" | ||
id="color-orange" | ||
value="color-orange" | ||
ng-click="$ctrl.updateNoteColor('#ffc470')" | ||
/> | ||
</li> | ||
<li> | ||
<label for="color-yellow">{{'Yellow' | translate }}</label> | ||
<input | ||
type="radio" | ||
name="note-color-option" | ||
id="color-yellow" | ||
value="color-yellow" | ||
ng-click="$ctrl.updateNoteColor('#ffff88')" | ||
/> | ||
</li> | ||
<li> | ||
<label for="color-green">{{'Green' | translate }}</label> | ||
<input | ||
type="radio" | ||
name="note-color-option" | ||
id="color-green" | ||
value="color-green" | ||
ng-click="$ctrl.updateNoteColor('#79d297')" | ||
/> | ||
</li> | ||
<li> | ||
<label for="color-blue">{{'Blue' | translate }}</label> | ||
<input | ||
type="radio" | ||
name="note-color-option" | ||
id="color-blue" | ||
value="color-blue" | ||
ng-click="$ctrl.updateNoteColor('#7cc4f8')" | ||
/> | ||
</li> | ||
<li> | ||
<label for="color-purple">{{'Purple' | translate }}</label> | ||
<input | ||
type="radio" | ||
name="note-color-option" | ||
id="color-purple" | ||
value="color-purple" | ||
ng-click="$ctrl.updateNoteColor('#d1a8ff')" | ||
/> | ||
</li> | ||
<li> | ||
<label for="color-pink">{{'Pink' | translate }}</label> | ||
<input | ||
type="radio" | ||
name="note-color-option" | ||
id="color-pink" | ||
value="color-pink" | ||
ng-click="$ctrl.updateNoteColor('#fd9ce0')" | ||
/> | ||
</li> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import angular from "angular"; | ||
import template from "./noteEditor.html"; | ||
|
||
const app = angular.module("app.noteEditor", []); | ||
|
||
const Controller = function () { | ||
const $ctrl = this; | ||
$ctrl.submitted = false; | ||
|
||
$ctrl.updateNoteText = (newText) => { | ||
$ctrl.selected.element.setText(newText); | ||
} | ||
|
||
$ctrl.updateNoteColor = (newColor) => { | ||
$ctrl.selected.element.setColor(newColor); | ||
} | ||
}; | ||
|
||
export default app.component("noteEditor", { | ||
template: template, | ||
bindings: { | ||
selected: "<", | ||
}, | ||
controller: Controller, | ||
}).name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this log.