Coder Social home page Coder Social logo

localwiki's Introduction

https://localwiki.org/static/theme/img/logo.png

LocalWiki is a grassroots effort to collect, share and open the world's local knowledge.

To edit LocalWiki or to bring LocalWiki to your community, please visit https://localwiki.org.

For information on the LocalWiki API, please see https://localwiki.org/api.

This is a meta repository, used to plan across the entire LocalWiki project. We use this repository to plan events, plan blog posts, figure out who should do what, etc.

To report an issue, a bug, a feature, a dream, a poem, a plan, or a whim, please see..

How does this work?

You can report, dream, scheme anything here! LocalWiki volunteers will move your issue to other repositories if necessary. In particular, feature requests and proposals that haven't yet had a chance for community input are left here, as well as UI discussion and debate. This repository is also used for all of our other planning.

localwiki's People

Contributors

philipn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

localwiki's Issues

Make anchors use id instead of name

We (and CKEditor) currently use this kind of anchor(shown inside a heading as an example):

{{{

First section

}}}

CKeditor in addition allows children in the element, but this might get confusing so we don't allow that.

However, the "name" attribute of the element is deprecated in HTML5, and instead a fragment link will match any element's "id" attribute. We should switch to this and either do:

We (and CKEditor) currently use this kind of anchor(shown inside a heading as an example):

{{{

First section

}}}

or at least this:

{{{

First section

}}}

The htmlFilter in CKeditor has to be customized to allow the latter case. Currently it would strip out the childless element unless it has a "name" attribute.

Sycamore page import

This will probably be more than a little interesting!

Things I deem to be requirements:

  • Full page history must be maintained (RocWiki has well over 100,000 edits)
  • Formatting must be preserved
  • Ownership/attribution of edits must continue
  • Sycamore macro calls must be translated into their Sapling equivalents
  • No downtime: if the migration takes days, this should happen in the background without editing being blocked or lost

It might be worth investigating something like Celery to orchestrate this... in my experience, a single monolithic Python process crawling the entirety of RocWiki isn't very happy :-)

Inline image issues with Chrome (and others)

In FF it's possible to drag two inline images next to each other, but this doesn't seem possible in Chrome (and possibly other browsers).

This seems like part of a general image behavior problem.

To reproduce (in Chrome):

  1. Add an image to a page.
  2. Add another image.
  3. Create a new, blank line.
  4. Drag the first image to that new line.
  5. Try and drag the second image to that line, next to the image.
  6. Additionally, try and add any sort of text next to the image that's on that new line.

Seems like an issue based on editing I'm seeing.

no image list icons in IE 9?

"I'm at home now (on windows vista and firefox 5.0) and when I went back to the page I get those icons. I was not getting them in IE earlier this afternoon."

Not sure if it's legit, but we should check

Improving installation

First off, we should collaborate w/ the [http://openblock.org OpenBlock] guys on all this. They are trying to do the same thing.

We can create a {{{setup.py}}} file which installs a global {{{sapling}}} module. Look at how [http://trac.edgewall.org/wiki/TracInstall trac does this].

In particular:

This will byte-compile the python source code and install it as an .egg file or folder in the site-packages directory of your Python installation. The .egg will also contain all other resources needed by standard Trac, such as htdocs and templates.

The script will also install the trac-admin command-line tool, used to create and maintain project environments, as well as the tracd standalone server.

So we could install a global {{{sapling-manage}}} command that's just a {{{manage.py}}} wrapper.

Ideally someone can just do:

  1. Install system requirements.
  2. pip install -e <install_url>
  3. sapling-manage create_config

{{{create_config}}} would prompt for necessary things (db info, etc) a'la trac's admin creation command. Then it would generate a new localsettings.py file and tell the user where it's located. Or we could skip this step and just have people edit the config.

  1. sapling-manage deploy. This creates a .wsgi file (if they want WSGI) in a specificed location and runs collectstatic.
  2. Tell them to add necessary apache config.

Look at how trac does it. How other projects do it.

Then the next step is making a .deb that does all the platform-specific stuff and even sets up apache.

CSS styling tweakin'

  • Images/headings/paragraphs and flow.
  • inline-block / floating
  • map positioning
    • still needs work. needs more padding at bottom. and at top? looks off balance.
  • general tweakage

Some image usability issues

I noticed on triangle:

https://triangle.localwiki.org/five%20points%20cac/_history/

  1. He added an image, but it was wrapped in a heading.
  2. He tried to move it, but the caption didn't move along with it https://triangle.localwiki.org/five%20points%20cac/_history/16...17

Then he mostly gave up.

How can we make this better?

One idea may be to make it so images can't be inside of headings. Like on insert / drag / whatever, if it's inside of a heading:

{{{

My heading is here

}}}

we pull the image out to the right:

{{{

My heading is here

}}}

if the image is on the very left of the heading, we pull it out to the left:

{{{

My heading is here

}}}

{{{
<img ..>

My heading is here


}}}

Rationale: people may take an image and drag it inside of a header. Really, they want to position the image to the left or the right of the header.

a tag inside a tag

[[Image(http://yoyodawgdawg.com/pics/yo-dawg-the-original.jpg)]]

around a thumbnail should cause the (link to image detail) to not be put there

Perfect three-way merging output

Output:

Edit conflict! Your version:I changed the headline

Edit conflict! Other version:Different headline

Does diffing still work? Edit conflict! Other version:I added a different sentence here. Edit conflict! Your version:I added a sentence here.

As you can see "Your version" is not always first, which it probably should be, and even though the conflict was the entire h1 element in the first one, it puts the warning below that element. Should really be above it.

Autocomplete logic improvements

  • Auto-complete of "UNT" on denton is kind of weird. It shows a bunch of UNT pages but not the "UNT" page. We should order by..length? Or something?

Banning IPs

#296 referenced this, but I'm guessing it's not very helpful to do this in Django as they should be rejected as soon as possible. But maybe there is a quick way to add IPs that Apache should reject.

First-time usability confusion points

Double click to end path when drawing -- was confusing. Wasn't obvious.


Deleting things in the map -- delete button on kb should delete an area or line or point. deleting is just kinda weird.


Undo button in editor?

Explore / debate user messaging / notification

Explore ideas here. Possibilities:

  • "Bookmarks" / watchlist. Notification of changes. Default: add user page to bookmarks. Email on change (setting)
  • User messaging? Discuss & debate w/ folks. Maybe make it non-private user messaging.

Toolbar doesn't pop out when scrolling horizontally

  1. Create a page
  2. Insert an image
  3. Set image width wider than browser width
  4. Scroll window to the right

Want: toolbar pops out and stays on the screen, at same y position
Have: toolbar doesn't pop out until you scroll down

DavisWiki/RocWiki legacy URL lookups

Two parts:

Write Middleware to deal with this.

For just daviswiki and rocwiki. Not relevant for anything else, even wikispot.org sites.

Do something like:

{{{
might_be_pagename = urllib.unquote(page_url.replace('_', '%'))
if Page.objects.filter(slug=our_slugify(might_be_pagename)):
< redirect "moved permanently" to the page's canonical url >
}}}

this should work on, like, /Rob_20Roy

In Apache (or whatever), route /index.cgi/ -> /

Centering image is wonky

  1. Make an inline image, put it inside a paragraph with text before and after it.
  2. Center the paragraph using the text-center button.
  3. Paragraph is split:

{{{

Hi there dood

sup?

}}}

without the {{{}}} the paragraph isn't split, so it's likely CKeditor trying to do something clever here.

The same thing happens with the text-right button.

Paginate/ajaxify the version history view

Right now it's just one long list. This is easy to paginate, but would be preferable to just have a button labeled "Older revisions" that appends to the current page using ajax.

font todo

  • Swap out external URL for fonts to local @font-face.
  • Find better body font? Play with design.
  • Fix inline-block for IE7/8.

schema.org schema

For places, at least. And map pages.

It's based on HTML5 microdata.

Just look into this. May not be best choice. RDFa? Other things? This seems like a contentious proposal in the OSS community / microformats / semantic -- totally top-down.

Includepage plugin has weird trailing space

I see weird extra spacing at the bottom of the include page plugin. Toggling "View source" fixes it.

More pronounced in FF but also happens in Chrome.

Page like:

P1

P2

then click between P1, P2 and create a new paragraph. Add the include page there. You'll see extra space.

varnish set up for denton

A bit tricky due to SSL.

The usual "quick and dirty"-90% solution for varnish is to cache everything except requests containing cookies. But it looks like normal requests (non-editing) are showing cookies (__utmX -- for google analytics).

So the quick and dirty fix for us is to do something like this:

https://www.varnish-cache.org/trac/wiki/VCLExampleCachingLoggedInUsers

Where we check to see if the cookie is a google analytics cookie and, if so, we still send cached content.

This will be good enough for now.


Or we can just disable google analytics.

New splash site

..Can be slightly after we hit milestone #2. Immediately following?

Kill right-click context menu

It'd be good to kill the necessary right-click context menu.

Currently, the right click context is only '''required''' when dealing with tables (cells, rows and the full table).

We should:

  1. Replace the context menu, in the case of tables, with a menu that appears when then table itself is clicked on.
  2. Explore adding a similar menu to links, images, etc.
  3. Turn off the CKeditor context menu, unbind it from right-click, and ensure the browser's default context menu appears when right clicking. This will fix the confusing "Control + Right click for spell check" issue.

wikipedia interwiki redirect

Before dwiki et all.

Make sure this never breaks.

Maybe add localwiki: to map & redirect to associated projects.

Refactor HTML parsing/serialization

No time to do this work now, so just dumping some thoughts here regarding how to do this.

Here's the code which currently does the sanitization of page contents:

{{{
def sanitize_html_fragment(unsafe, allowed_elements=None):
# TODO: make this more simple / understandable and factor out from
# plugins.html_to_template_text
if not allowed_elements:
allowed_elements = sanitizer.HTMLSanitizer.allowed_elements
p = html5lib.HTMLParser(tree=treebuilders.getTreeBuilder("lxml"),
tokenizer=custom_sanitizer(allowed_elements),
namespaceHTMLElements=False)
top_level_elements = p.parseFragment(unsafe)
# put top level elements in container
container = etree.Element('div')
if top_level_elements and not hasattr(top_level_elements[0], 'tag'):
container.text = top_level_elements.pop(0)
container.extend(top_level_elements)

html_bits = [etree.tostring(elem, method='html', encoding='utf-8')
                 for elem in container]

return ''.join([escape(container.text or '')] + html_bits)

}}}

As noted, very similar code also exists in pages.plugins where we have to parse the page contents and serialize again.

First, we should factor this out into the field code and make all the things that might be needed accessible (parser, treewalker, serializer, etc).

Then we need to investigate the best framework to use to do this work. Currently we are using lxml.etree, which is full featured and widely used, but there are some things that seem weird about it, such as text nodes being attached to elements as element.text or element.tail. This can lead to bugs and security issues. For example, if you forget to escape the text node before appending it to the output as is done above, the text node (unescaped) will get sent to the browser as regular html code. A mode browser-like DOM view, where text is also a node, would be much better.

In the investigation, I'd take a look at all the tree builder families available in html5lib and pick the best one. Then make sure it can do all of the things we need: parse HTML fragment, sanitization on read, correct HTML output of a fragment, walking through the tree, etc.

naive optimizations

Make sure whole-site caching can work. We should be able to get many more req/sec than we do now.

Mike looked and found a ton of queries, even with per-site caching on. select_postgis_version() queries.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.