diff --git a/content/modules.md b/content/modules.md deleted file mode 100644 index d136deb..0000000 --- a/content/modules.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Modules Library" -description: "Browse all available modules for the Dispute Protocol Builder" -layout: "modules" -draft: false ---- - -This page displays all available modules in the Dispute Protocol Builder, organized by Stage and Component. You can see which Templates use each module. \ No newline at end of file diff --git a/data/modules/assessment.yaml b/data/modules/assessment.yaml deleted file mode 100644 index be779cf..0000000 --- a/data/modules/assessment.yaml +++ /dev/null @@ -1,27 +0,0 @@ -- id: participant-goal-assessment - title: "Participant Goal Assessment" - componentId: dispute_assessment - fieldId: disputeAssessmentText - content: | - The dispute is assessed by focusing on the goals of all participants: - - 1. Each participant articulates what they hope to achieve through the process - 2. Participants identify areas of common ground and shared interests - 3. The facilitator helps frame the dispute in terms of compatible and competing goals - 4. Participants rate the importance of different goals to help prioritize - 5. Assessment continues throughout the process as goals may evolve - 6. Resolution options are evaluated against the stated goals of participants - -- id: fact-assessment - title: "Fact Assessment" - componentId: dispute_assessment - fieldId: disputeAssessmentText - content: | - The dispute is assessed through a structured fact-finding process: - - 1. Facilitators interview all parties separately to gather initial accounts - 2. Documentary evidence and other materials are collected and cataloged - 3. Areas of factual agreement and disagreement are identified - 4. Where possible, neutral verification of disputed facts is sought - 5. A written summary of established facts is created and shared with participants - 6. The dispute assessment is updated as new information becomes available \ No newline at end of file diff --git a/data/modules/delegation.yaml b/data/modules/delegation.yaml deleted file mode 100644 index 3cba09e..0000000 --- a/data/modules/delegation.yaml +++ /dev/null @@ -1,41 +0,0 @@ -- id: police-report - title: "Refer to Police Report" - componentId: delegation_options - fieldId: delegationOptionsText - content: | - In cases where this process is inadequate, disputes may be referred to law enforcement: - - 1. Situations involving immediate danger or criminal behavior are referred to police - 2. The community does not attempt to handle issues of criminal law internally - 3. Support is offered to community members who need to file police reports - 4. Community members may request an advocate to accompany them - 5. The community maintains relationships with local law enforcement liaisons - 6. Community process may resume after legal proceedings if appropriate - -- id: internal-process - title: "Refer to Another Internal Process" - componentId: delegation_options - fieldId: delegationOptionsText - content: | - In cases where this process is inadequate, disputes may be referred to other internal processes: - - 1. The community maintains several conflict resolution pathways for different situations - 2. Disputes involving multiple community groups are referred to the inter-group resolution committee - 3. Disputes requiring specialized knowledge may be referred to relevant working groups - 4. Cases requiring more structured intervention may be referred to the elder council - 5. Mediation services are available as an alternative to the standard process - 6. The community maintains clear guidelines for which process is appropriate for different situations - -- id: external-process - title: "Refer to External Process" - componentId: delegation_options - fieldId: delegationOptionsText - content: | - In cases where this process is inadequate, disputes may be referred to external resolution services: - - 1. The community maintains partnerships with professional mediation services - 2. Complex cases may be referred to specialized conflict resolution organizations - 3. Cases involving legal questions may be referred to legal aid services - 4. The community maintains a fund to help members access external services when needed - 5. A list of recommended external resources is maintained and regularly updated - 6. The community liaison helps ensure smooth handoff to external processes \ No newline at end of file diff --git a/data/modules/filing.yaml b/data/modules/filing.yaml deleted file mode 100644 index 147028f..0000000 --- a/data/modules/filing.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- id: written-filing - title: Written Filing Process - componentId: filing - fieldId: filingProcess - content: | - 1. Complainant fills out a standard form describing the dispute - 2. Form includes sections for: parties involved, description of the issue, desired outcome - 3. Submission can be made via email, website, or physical drop-off - 4. Complainant receives confirmation of receipt - 5. Submission is reviewed for completeness within 48 hours - -- id: verbal-filing - title: Verbal Filing Process - componentId: filing - fieldId: filingProcess - content: | - 1. Complainant schedules a meeting with a designated intake person - 2. During the meeting, the intake person documents the dispute details - 3. The intake person reviews the documented information with the complainant - 4. Once approved, the complaint is officially filed - 5. Complainant receives a copy of the documented complaint \ No newline at end of file diff --git a/data/modules/intake.yaml b/data/modules/intake.yaml deleted file mode 100644 index 96dd9c9..0000000 --- a/data/modules/intake.yaml +++ /dev/null @@ -1,104 +0,0 @@ -- id: incident-report-form - title: "Incident Report Form" - componentId: process_start - fieldId: processStartText - content: | - The dispute process begins when a community member fills out an incident report form. This form includes: - - 1. Details about the parties involved in the dispute - 2. A description of what happened, including dates and times - 3. Any relevant evidence or documentation - 4. A description of the outcome the person is seeking - - The form can be submitted electronically through our community portal or as a paper form to the designated community coordinator. - -- id: strong-confidentiality - title: "Strong Confidentiality" - componentId: information_access - fieldId: informationAccessText - content: | - Our community practices strong confidentiality in dispute processes: - - 1. Only the designated facilitator(s) and directly involved parties have access to full information - 2. All participants must sign confidentiality agreements - 3. Records are kept secure and are accessible only to the dispute resolution committee - 4. Only general statistics and anonymized outcomes may be shared with the broader community - 5. Breaches of confidentiality may result in removal from the process - -- id: strong-transparency - title: "Strong Transparency" - componentId: information_access - fieldId: informationAccessText - content: | - Our community practices strong transparency in dispute processes: - - 1. Basic information about active disputes is available to all community members - 2. Proceedings are documented and records are available for community review - 3. Regular updates on the status of disputes are shared at community meetings - 4. Only personal identifying information and sensitive details are redacted - 5. All decisions and their rationales are published internally - -- id: notification-message - title: "Notification Message" - componentId: participant_inclusion - fieldId: participantInclusionText - content: | - Additional participants are brought into the process through a formal notification message: - - 1. The facilitator sends a written notification to all identified relevant parties - 2. The notification includes the nature of the dispute, the process that will be followed, and their role - 3. Recipients are given information about how to respond and participate - 4. The notification includes resources to help participants understand the process - 5. Participants have 7 days to acknowledge receipt and confirm their participation - -- id: summons - title: "Summons" - componentId: participant_inclusion - fieldId: participantInclusionText - content: | - Additional participants are brought into the process through a formal summons: - - 1. The dispute committee issues an official summons to all identified relevant parties - 2. The summons clearly states that participation is required according to community agreements - 3. It specifies the date, time, and method of required appearance - 4. The summons outlines potential consequences of non-participation - 5. Delivery of the summons is documented to ensure proper notification - -- id: voluntary-participation - title: "Voluntary Participation" - componentId: participation_requirement - fieldId: participationRequirementText - content: | - Participation in our dispute resolution process is entirely voluntary: - - 1. All parties must consent to participate in the process - 2. Any party may withdraw from the process at any time - 3. No negative consequences result from declining to participate - 4. Alternative means of resolution are suggested for those who decline - 5. The community respects individuals' autonomy in choosing whether to engage - -- id: required-participation - title: "Required Participation" - componentId: participation_requirement - fieldId: participationRequirementText - content: | - Participation in our dispute resolution process is required for all community members: - - 1. By joining our community, members agree to participate in the dispute process when necessary - 2. Participation is mandatory for all named parties in a dispute - 3. Failure to participate may result in consequences as outlined in our community agreement - 4. Only in exceptional circumstances may exemptions be granted - 5. Repeated refusal to participate may result in review of community membership - -- id: stake-based-participation - title: "Stake-based Participation" - componentId: participation_commitments - fieldId: participationCommitmentsText - content: | - Participants in the dispute process must place a meaningful stake into the process: - - 1. Each participant contributes a small financial deposit (adjusted based on ability to pay) - 2. Deposits are returned when parties fulfill all process commitments - 3. Participants commit a specified amount of time to the process - 4. Participants agree to adhere to all ground rules and procedural guidelines - 5. All parties agree to implement the resolution in good faith \ No newline at end of file diff --git a/data/modules/notification.yaml b/data/modules/notification.yaml deleted file mode 100644 index ff3c52f..0000000 --- a/data/modules/notification.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- id: direct-notification - title: Direct Notification Process - componentId: notification - fieldId: notificationMethod - content: | - 1. All parties are notified in writing within 72 hours of a filed complaint - 2. Notification includes a copy of the complaint and next steps - 3. Parties confirm receipt of notification - 4. If no confirmation is received within 48 hours, a secondary contact method is used - 5. All notifications maintain privacy and confidentiality standards - -- id: facilitated-notification - title: Facilitated Notification Process - componentId: notification - fieldId: notificationMethod - content: | - 1. A neutral facilitator contacts all parties individually - 2. The facilitator explains the process and shares the complaint details - 3. Parties have an opportunity to ask questions about the process - 4. The facilitator documents that notification has occurred - 5. Follow-up written summary is provided to all parties \ No newline at end of file diff --git a/data/modules/participants.yaml b/data/modules/participants.yaml deleted file mode 100644 index fdd0dd2..0000000 --- a/data/modules/participants.yaml +++ /dev/null @@ -1,33 +0,0 @@ -- id: community-circle - title: Community Circle Model - componentId: participants - fieldId: participantsRoles - content: | - 1. Facilitator: Guides the process, ensures fairness, and helps maintain focus - 2. Affected Parties: Those directly impacted by the dispute - 3. Support Persons: Friends, family, or advocates who support affected parties - 4. Community Members: Representatives who bring wider perspective - 5. Resource People: Those with relevant expertise to inform the process - -- id: mediation-model - title: Mediation Model - componentId: participants - fieldId: participantsRoles - content: | - 1. Mediator: Neutral third party who facilitates the process - 2. Disputants: Primary parties involved in the conflict - 3. Advocates: Optional support persons who may speak on behalf of disputants - 4. Witnesses: Those who provide information relevant to the dispute - 5. Implementers: Those responsible for helping carry out any agreements - -- id: council-model - title: Council Model - componentId: participants - fieldId: participantsRoles - content: | - 1. Council Members: A designated group responsible for hearing disputes - 2. Complainant: Person bringing the dispute - 3. Respondent: Person responding to the complaint - 4. Witnesses: Those providing testimony or evidence - 5. Advisors: Those who support the council with expertise - 6. Community Observers: Those who may witness proceedings for transparency \ No newline at end of file diff --git a/data/modules/principles.yaml b/data/modules/principles.yaml deleted file mode 100644 index c1ff1d1..0000000 --- a/data/modules/principles.yaml +++ /dev/null @@ -1,32 +0,0 @@ -- id: restorative - title: Restorative Justice Principles - componentId: principles - fieldId: principlesText - content: | - 1. Focus on harm and needs of those affected - 2. Address obligations resulting from harm - 3. Use inclusive, collaborative processes - 4. Involve all stakeholders (victims, offenders, community) - 5. Work toward repairing harm and healing relationships - -- id: transformative - title: Transformative Justice Principles - componentId: principles - fieldId: principlesText - content: | - 1. Seek to address immediate safety, healing, and agency - 2. Work to transform the conditions that allowed violence to occur - 3. Build community accountability systems - 4. Focus on community-based responses without relying on punitive systems - 5. Acknowledge interconnection of all forms of violence - -- id: consensus - title: Consensus-Based Principles - componentId: principles - fieldId: principlesText - content: | - 1. All members have equal input in decision-making - 2. Seek solutions that address everyone's fundamental concerns - 3. Prioritize listening and understanding diverse perspectives - 4. Work toward outcomes that all parties can accept - 5. Focus on collaborative problem-solving over adversarial positions \ No newline at end of file diff --git a/data/modules/process.yaml b/data/modules/process.yaml deleted file mode 100644 index c0056e3..0000000 --- a/data/modules/process.yaml +++ /dev/null @@ -1,65 +0,0 @@ -- id: participant-facilitation - title: "Participant Facilitation" - componentId: facilitation - fieldId: facilitationText - content: | - The dispute process is facilitated by the participants themselves: - - 1. Participants take turns leading different parts of the conversation - 2. A written guide provides structure to ensure all voices are heard - 3. All participants receive basic training in productive dialogue techniques - 4. Time limits and speaking guidelines ensure fair participation - 5. Any participant can call for a break or reset if the process becomes unproductive - -- id: peer-facilitation - title: "Peer Facilitation" - componentId: facilitation - fieldId: facilitationText - content: | - The dispute process is facilitated by peers from within the community: - - 1. A pool of trained peer facilitators is maintained within the community - 2. Facilitators are selected who have no direct involvement in the dispute - 3. Peer facilitators receive regular training in conflict resolution techniques - 4. Typically, two peer facilitators work together on each case - 5. Peer facilitators help maintain structure but do not make decisions - -- id: trained-facilitation - title: "Trained Facilitation (e.g. mediator)" - componentId: facilitation - fieldId: facilitationText - content: | - The dispute process is facilitated by professionally trained mediators: - - 1. Professional mediators with formal certification lead the process - 2. Mediators are selected from outside the community to ensure neutrality - 3. Mediators have specific training in the type of conflict being addressed - 4. The community maintains a roster of approved mediators - 5. Mediators are paid for their services according to a pre-established rate - -- id: facilitation-committee - title: "Facilitation Committee" - componentId: facilitation - fieldId: facilitationText - content: | - The dispute process is facilitated by a standing committee: - - 1. A dedicated committee of 5-7 members oversees all dispute processes - 2. Committee members serve rotating terms and receive ongoing training - 3. For each dispute, a subgroup of 2-3 committee members is assigned - 4. Committee members with conflicts of interest must recuse themselves - 5. The committee follows established procedures and maintains records of all cases - -- id: nonviolent-communication - title: "Nonviolent Communication" - componentId: ground_rules - fieldId: groundRulesText - content: | - Our dispute process follows the principles of Nonviolent Communication (NVC): - - 1. Participants focus on observations rather than evaluations or judgments - 2. Participants express feelings using "I" statements rather than blaming others - 3. Participants identify needs that are or are not being met by the situation - 4. Participants make clear, actionable requests rather than demands - 5. Facilitators help participants translate judgmental language into NVC format - 6. Active listening is practiced, with participants reflecting back what they've heard \ No newline at end of file diff --git a/data/modules/resolution.yaml b/data/modules/resolution.yaml deleted file mode 100644 index 669a488..0000000 --- a/data/modules/resolution.yaml +++ /dev/null @@ -1,41 +0,0 @@ -- id: participant-consensus - title: "Participant Consensus" - componentId: resolution_process - fieldId: resolutionProcessText - content: | - Resolution occurs through consensus of all involved participants: - - 1. Participants collaboratively develop possible solutions - 2. All parties must agree to the final resolution - 3. Consensus does not mean everyone's first choice, but a solution everyone can accept - 4. Multiple rounds of proposal and revision may be necessary - 5. Facilitators help test solutions against participants' stated needs - 6. Once consensus is reached, the agreement is documented in writing - -- id: facilitator-adjudication - title: "Facilitator Adjudication" - componentId: resolution_process - fieldId: resolutionProcessText - content: | - Resolution occurs through a decision made by the facilitator(s): - - 1. After full deliberation, the facilitator(s) makes a binding decision - 2. The decision is based on community guidelines and the specifics of the case - 3. Facilitators provide a written explanation of their decision and reasoning - 4. All parties agree in advance to abide by the facilitator's decision - 5. Decisions establish precedent for future similar cases - 6. Decisions may be appealed only on specific grounds - -- id: jury-adjudication - title: "Jury Adjudication" - componentId: resolution_process - fieldId: resolutionProcessText - content: | - Resolution occurs through a decision made by a jury of community peers: - - 1. A jury of 5-7 community members is randomly selected - 2. Jury members receive an orientation to their role and responsibilities - 3. After hearing all perspectives, the jury deliberates privately - 4. The jury reaches a decision by two-thirds majority - 5. The jury provides a written explanation of their decision - 6. All community members agree in advance to respect jury decisions \ No newline at end of file diff --git a/static/css/main.css b/static/css/main.css index 8cd40c2..b553f58 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -74,139 +74,7 @@ nav ul li a:hover { border-bottom: 1px solid var(--dark-color); } -/* Modules Page Styles */ -.search-filter { - margin-bottom: 2rem; - padding: 1.5rem; - background-color: #f5f5f5; - border: 1px solid var(--border-color); - display: flex; - flex-wrap: wrap; - gap: 1rem; - box-shadow: 0 2px 4px rgba(0,0,0,0.05); - border-radius: 4px; -} - -.search-filter input, -.search-filter select { - padding: 0.8rem; - border: 1px solid var(--border-color); - border-radius: 4px; - font-size: 1rem; - transition: all 0.2s ease; - box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); -} - -.search-filter input:focus, -.search-filter select:focus { - outline: none; - border-color: #000; - box-shadow: 0 0 0 2px rgba(0,0,0,0.1); -} - -.search-filter input { - flex-grow: 1; - min-width: 200px; -} - -.search-filter select { - min-width: 150px; - background-color: white; - cursor: pointer; - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.3 3.3L6 7.6 1.7 3.3c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l5 5c.2.2.4.3.7.3s.5-.1.7-.3l5-5c.4-.4.4-1 0-1.4s-1-.4-1.4 0z'/%3E%3C/svg%3E"); - background-position: calc(100% - 10px) center; - background-repeat: no-repeat; - padding-right: 30px; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -.modules-container { - margin-top: 2rem; -} - -.module-stage { - margin-bottom: 3rem; -} - -.module-stage h2 { - border-bottom: 2px solid var(--primary-color); - padding-bottom: 0.5rem; - margin-bottom: 1.5rem; - font-size: 1.75rem; -} - -.module-component { - margin-bottom: 2rem; - padding-left: 1.5rem; -} - -.module-component h3 { - color: var(--secondary-color); - margin-bottom: 1rem; - font-size: 1.4rem; -} - -.module-card { - border: 1px solid var(--border-color); - margin-bottom: 1.5rem; - border-radius: 4px; - overflow: hidden; - background-color: var(--light-color); - box-shadow: 0 1px 3px rgba(0,0,0,0.1); - transition: box-shadow 0.3s ease; -} - -.module-card.expanded { - box-shadow: 0 3px 6px rgba(0,0,0,0.16); -} - -.module-header { - padding: 1rem 1.5rem; - background-color: #f5f5f5; - cursor: pointer; - display: flex; - justify-content: space-between; - align-items: flex-start; - flex-wrap: wrap; - transition: background-color 0.2s ease; - position: relative; -} - -.module-header:hover { - background-color: #e9e9e9; -} - -.module-header:after { - content: "▼"; - position: absolute; - right: 1rem; - top: 1rem; - font-size: 0.8rem; - color: var(--secondary-color); - transition: transform 0.3s ease; -} - -.expanded .module-header:after { - transform: rotate(180deg); -} - -.module-header h4 { - margin: 0; - font-size: 1.1rem; - color: var(--primary-color); - flex-grow: 1; - padding-right: 2rem; -} - -.module-tags { - display: flex; - gap: 0.5rem; - flex-wrap: wrap; - margin-top: 0.8rem; -} - +/* Tag styles for components */ .tag { display: inline-block; padding: 0.3rem 0.6rem; @@ -234,68 +102,6 @@ nav ul li a:hover { color: #6600cc; border: 1px solid rgba(102, 0, 204, 0.2); } - -/* Module Library specific styles */ -.modules-container .component-card { - margin-bottom: 1rem; - animation: fadeIn 0.3s ease; -} - -@keyframes fadeIn { - from { opacity: 0; } - to { opacity: 1; } -} - -.modules-container .component-body { - padding: 1.5rem 2rem; - animation: slideDown 0.3s ease; -} - -@keyframes slideDown { - from { - opacity: 0; - transform: translateY(-10px); - } - to { - opacity: 1; - transform: translateY(0); - } -} - -.module-meta { - display: flex; - flex-wrap: wrap; - gap: 0.5rem; - margin-bottom: 1.5rem; -} - -.module-content { - margin: 1.5rem 0; -} - -.module-content textarea { - width: 100%; - min-height: 180px; - padding: 1rem; - border: 1px solid var(--border-color); - font-family: inherit; - resize: vertical; - background-color: var(--light-color); - font-size: 1.05rem; - line-height: 1.6; - color: var(--secondary-color); -} - -.module-templates { - margin-top: 1.5rem; - padding-top: 1rem; - border-top: 1px solid var(--border-color); - font-size: 0.9rem; - color: var(--accent-color); -} - -.module-templates strong { - color: var(--secondary-color); font-weight: 600; margin-right: 0.5rem; } @@ -1150,14 +956,21 @@ input:checked + .toggle-slider:before { textarea { width: 100%; - min-height: 250px; padding: 1rem; border: 1px solid var(--border-color); font-family: inherit; - resize: vertical; + resize: none; background-color: var(--light-color); font-size: 1.05rem; line-height: 1.5; + overflow: hidden; + transition: height 0.3s ease; + min-height: 60px; + box-sizing: border-box; + margin-bottom: 0.5rem; + display: block; + word-wrap: break-word; + white-space: pre-wrap; } .builder-actions { diff --git a/static/js/builder.js b/static/js/builder.js index 410400b..7f4efbd 100644 --- a/static/js/builder.js +++ b/static/js/builder.js @@ -436,6 +436,8 @@ document.addEventListener('DOMContentLoaded', function() { // Apply the content to the textarea textarea.value = content; + // Height adjustment is now handled by the global script + // Store in protocol data protocol.stages[stageId][componentId][fieldId] = content; fieldsPopulated++; @@ -467,6 +469,9 @@ document.addEventListener('DOMContentLoaded', function() { if (previewModeActive) { markComponentsWithContent(); } + + // Dispatch custom event for textarea auto-resize + document.dispatchEvent(new CustomEvent('templateApplied')); } // No helper functions needed anymore as we've simplified the approach diff --git a/static/js/modules-page.js b/static/js/modules-page.js deleted file mode 100644 index f8aa0ee..0000000 --- a/static/js/modules-page.js +++ /dev/null @@ -1,695 +0,0 @@ -document.addEventListener('DOMContentLoaded', function() { - console.log('Modules page initializing...'); - - // Reference to container and filters - const modulesContainer = document.getElementById('modules-container'); - const moduleSearch = document.getElementById('module-search'); - const stageFilter = document.getElementById('stage-filter'); - const componentFilter = document.getElementById('component-filter'); - const templateFilter = document.getElementById('template-filter'); - - // Data structures - let allModules = []; - let stageNames = {}; - let componentNames = {}; - let templateUsage = {}; - let processedTemplates = []; - - // Functions - function initializeData() { - console.log('Initializing data...'); - - // Check if data is available - if (typeof moduleData === 'undefined') { - console.error('Error: moduleData is undefined'); - modulesContainer.innerHTML = '
{{ .Description }}
-