You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cu...@apache.org on 2019/05/01 23:06:17 UTC

[whimsy] branch master updated (d5b84ad -> ca782b5)

This is an automated email from the ASF dual-hosted git repository.

curcuru pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git.


    from d5b84ad  -f suppresses errors
     new d37e02f  Allow multiple value selects
     new b85248b  Merge branch 'master' of https://github.com/apache/whimsy
     new ec44e57  Refactor; remove multiple support until can build it properly
     new ca782b5  Display tweaks and code cleanup

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 lib/whimsy/asf/forms.rb | 45 +++++++++++++++++++++------------------------
 www/members/mentors.cgi | 16 +++++++++-------
 2 files changed, 30 insertions(+), 31 deletions(-)


[whimsy] 03/04: Refactor; remove multiple support until can build it properly

Posted by cu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit ec44e5760900b3b8a576ba56c4a3e42da9371f6c
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Wed May 1 18:58:25 2019 -0400

    Refactor; remove multiple support until can build it properly
---
 lib/whimsy/asf/forms.rb | 48 ++++++++++++++++++++++--------------------------
 1 file changed, 22 insertions(+), 26 deletions(-)

diff --git a/lib/whimsy/asf/forms.rb b/lib/whimsy/asf/forms.rb
index 7102ed3..5e54c3b 100644
--- a/lib/whimsy/asf/forms.rb
+++ b/lib/whimsy/asf/forms.rb
@@ -1,8 +1,24 @@
 require 'wunderbar'
+require 'wunderbar/markdown'
 
 # Define common page features for whimsy tools using bootstrap styles
 class Wunderbar::HtmlMarkup
 
+  # Utility function to add icons to form controls
+  def _whimsy_forms_iconlink(icon: nil, iconlabel: nil, iconlink: nil)
+    if iconlink
+      _div.input_group_btn do
+        _a.btn.btn_default type: 'button', aria_label: "#{iconlabel}", href: "#{iconlink}", target: 'whimsy_help' do
+          _span.glyphicon class: "#{icon}", aria_label: "#{iconlabel}"
+        end
+      end
+    elsif icon
+      _span.input_group_addon do
+        _span.glyphicon class: "#{icon}", aria_label: "#{iconlabel}"
+      end
+    end
+  end
+
   # Display a single input control within a form; or if rows, then a textarea
   # @param name required string ID of control's label 
   def _whimsy_forms_input(
@@ -37,21 +53,11 @@ class Wunderbar::HtmlMarkup
             type: "#{type}", placeholder: "#{placeholder}", value: value,
             aria_describedby: "#{aria_describedby}", required: required, readonly: readonly
           end
-          if iconlink
-            _div.input_group_btn do
-              _a.btn.btn_default type: 'button', aria_label: "#{iconlabel}", href: "#{iconlink}", target: 'whimsy_help' do
-                _span.glyphicon class: "#{icon}", aria_label: "#{iconlabel}"
-              end
-            end
-          elsif icon
-            _span.input_group_addon do
-              _span.glyphicon class: "#{icon}", aria_label: "#{iconlabel}"
-            end
-          end
+          _whimsy_forms_iconlink(icon: icon, iconlabel: iconlabel, iconlink: iconlink)
         end
         if helptext
           _span.help_block id: "#{aria_describedby}" do
-            _ "#{helptext}"
+            _markdown "#{helptext}"
           end
         end
       end
@@ -66,7 +72,7 @@ class Wunderbar::HtmlMarkup
     value: '', # Currently selected value
     valuelabel: '', # Currently selected valuelabel
     options: nil, # ['value'] or {"value" => 'Label for value'} of all selectable values
-    multiple: false,
+    multiple: false, # Not currently supported
     required: false,
     readonly: false,
     icon: nil,
@@ -81,7 +87,7 @@ class Wunderbar::HtmlMarkup
       _label.control_label.col_sm_3 label, for: "#{name}"
       _div.col_sm_9 do
         _div.input_group do
-          _select.form_control name: "#{name}", id: "#{name}", multiple: "#{multiple}", aria_describedby: "#{aria_describedby}", required: required, readonly: readonly do
+          _select.form_control name: "#{name}", id: "#{name}", aria_describedby: "#{aria_describedby}", required: required, readonly: readonly do
             if ''.eql?(value)
               if ''.eql?(placeholder)
                 _option '', value: '', selected: 'selected'
@@ -101,21 +107,11 @@ class Wunderbar::HtmlMarkup
               end
             end
           end
-          if iconlink
-            _div.input_group_btn do
-              _a.btn.btn_default type: 'button', aria_label: "#{iconlabel}", href: "#{iconlink}", target: 'whimsy_help' do
-                _span.glyphicon class: "#{icon}", aria_label: "#{iconlabel}"
-              end
-            end
-          elsif icon
-            _span.input_group_addon do
-              _span.glyphicon class: "#{icon}", aria_label: "#{iconlabel}"
-            end
-          end
+          _whimsy_forms_iconlink(icon: icon, iconlabel: iconlabel, iconlink: iconlink)
         end
         if helptext
           _span.help_block id: "#{aria_describedby}" do
-            _ "#{helptext}"
+            _markdown "#{helptext}"
           end
         end
       end


[whimsy] 01/04: Allow multiple value selects

Posted by cu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit d37e02f750105e495654519843fdccad0048d0ce
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Wed May 1 16:15:04 2019 -0400

    Allow multiple value selects
---
 lib/whimsy/asf/forms.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/whimsy/asf/forms.rb b/lib/whimsy/asf/forms.rb
index 257361b..7102ed3 100644
--- a/lib/whimsy/asf/forms.rb
+++ b/lib/whimsy/asf/forms.rb
@@ -66,6 +66,7 @@ class Wunderbar::HtmlMarkup
     value: '', # Currently selected value
     valuelabel: '', # Currently selected valuelabel
     options: nil, # ['value'] or {"value" => 'Label for value'} of all selectable values
+    multiple: false,
     required: false,
     readonly: false,
     icon: nil,
@@ -80,7 +81,7 @@ class Wunderbar::HtmlMarkup
       _label.control_label.col_sm_3 label, for: "#{name}"
       _div.col_sm_9 do
         _div.input_group do
-          _select.form_control name: "#{name}", id: "#{name}", aria_describedby: "#{aria_describedby}", required: required, readonly: readonly do
+          _select.form_control name: "#{name}", id: "#{name}", multiple: "#{multiple}", aria_describedby: "#{aria_describedby}", required: required, readonly: readonly do
             if ''.eql?(value)
               if ''.eql?(placeholder)
                 _option '', value: '', selected: 'selected'


[whimsy] 04/04: Display tweaks and code cleanup

Posted by cu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit ca782b5b36527588915603b4a30a522aa5885829
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Wed May 1 19:06:08 2019 -0400

    Display tweaks and code cleanup
---
 www/members/mentors.cgi | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/www/members/mentors.cgi b/www/members/mentors.cgi
index 30aefee..645138d 100755
--- a/www/members/mentors.cgi
+++ b/www/members/mentors.cgi
@@ -34,8 +34,7 @@ def read_mentors(path)
   Dir[File.join(path, '*.json')].sort.each do |file|
     # Skip files with - dashes, they aren't apacheids
     next if file.include?('-')
-    file.untaint
-    read_mentor(file, mentors)
+    read_mentor(file.untaint, mentors)
   end
   return mentors
 end
@@ -58,9 +57,10 @@ _html do
       helpblock: -> {
         _p do
           _ 'This page lists experienced ASF Members who have volunteered to mentor newer ASF Members to help them get more involved in Foundation governance and operations.'
-          _br
-          _ "If you are a newer Member looking for a mentor, please reach out directly to available volunteers below by #{uimap['contact'][0]}. "
-          _ 'Remember, this is an informal program run by volunteers, so please be kind - and patient!  Mentors currently listed:'
+        end
+        _p do
+          _ "If you are a newer Member looking for a mentor, please reach out directly to available volunteers below that fit your interests by #{uimap['contact'][0]}. "
+          _ 'Remember, this is an informal program run by volunteers, so please be kind - and patient!  Not every mentoring pair may be the right fit.  Mentors currently listed as available for new mentees:'
         end 
         _ul.list_inline do
           mentors.each do | apacheid, mentor |
@@ -70,16 +70,17 @@ _html do
           end
         end
         _a.btn.btn_default.btn_sm (mentors.has_key?($USER) ? 'Edit Your Mentor Record' : 'Volunteer To Mentor'), href: "/members/mentor-update.cgi", role: "button"
+        _p.text_warning 'Reminder: All Mentoring data is private to the ASF; only ASF Members can sign up here as Mentors or Mentees.'
       }
     ) do
       _div.panel_group id: MENTORS_LIST, role: "tablist", aria_multiselectable: "true" do
-        mentors.each_with_index do |(apacheid, mentor), n|
+        mentors.each_with_index do |(apacheid, mentor), n| # TODO Should we randomize the default listing?
           _div!.panel.panel_default  id: apacheid do
             _div!.panel_heading role: "tab", id: "#{MENTORS_LIST}h#{n}" do
               _h4!.panel_title do
                 _a!.collapsed role: "button", data_toggle: "collapse",  aria_expanded: "false", data_parent: "##{MENTORS_LIST}", href: "##{MENTORS_LIST}c#{n}", aria_controls: "#{MENTORS_LIST}c#{n}" do
                   _ "#{mentor[MentorFormat::PUBLICNAME]}  (#{apacheid})  Timezone: #{mentor[MentorFormat::TIMEZONE]}  "
-                  _span.glyphicon class: "glyphicon-chevron-down"
+                  _span.glyphicon.glyphicon_chevron_down id: "#{apacheid}-nav"
                   mentor.delete(MentorFormat::PUBLICNAME) # So not re-displayed below
                 end
               end
@@ -139,6 +140,7 @@ _html do
                 end
               end
             end
+            _p 'Please work with dev@whimsical to fix these JSON files.'
           end
         end
       end


[whimsy] 02/04: Merge branch 'master' of https://github.com/apache/whimsy

Posted by cu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit b85248be02936db48eca499e6b66864ba4c91dcb
Merge: d37e02f d5b84ad
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Wed May 1 18:58:01 2019 -0400

    Merge branch 'master' of https://github.com/apache/whimsy

 tools/monthly_tidy.rb      | 26 ++++++++++++++++++++++++++
 www/board/agenda/routes.rb |  2 +-
 2 files changed, 27 insertions(+), 1 deletion(-)