Skip to content
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

Allow users to customise number of recent presets #8895

Open
boothym opened this issue Jan 13, 2022 · 2 comments
Open

Allow users to customise number of recent presets #8895

boothym opened this issue Jan 13, 2022 · 2 comments
Labels
usability An issue with ease-of-use or design

Comments

@boothym
Copy link
Contributor

boothym commented Jan 13, 2022

At the moment, iD shows the four most recently used preset at the top of the list.

However sometimes this means recently used presets drop off the list if you are editing an area which needs a variety of presets. Add a car park, a building, some trees, a pitch and then you're having to type in "car" again to add another car park.

It would be useful if this could be increased - the preferences panel would be a good places to have a box with an up/down selector.

@sekerob
Copy link

sekerob commented Jan 29, 2022

Given the wide variety of things I work on in a single edit set day after day e.g farmland, farmyard, buildings, track, orchard, meadow, grassland tree, tree rows as a typical group, certainly many times thought of this. 8-10 last used would be great and persistent, groups of these one can save to the user profile would be the ultimate so they can be recalled at the next session.

Big Bump.

@1ec5
Copy link
Collaborator

1ec5 commented Sep 26, 2022

Here’s what currently controls the number of remembered recent presets:

recents = _this.recent().matchGeometry(geometry).collection.slice(0, 4);

Here’s what determines the contents of the Preferences pane:

.sections([
uiSectionPrivacy(context)
]);

Here’s what a section definition looks like:

export function uiSectionPrivacy(context) {
let section = uiSection('preferences-third-party', context)
.label(() => t.append('preferences.privacy.title'))
.disclosureContent(renderDisclosureContent);
function renderDisclosureContent(selection) {
// enter
selection.selectAll('.privacy-options-list')
.data([0])
.enter()
.append('ul')
.attr('class', 'layer-list privacy-options-list');
let thirdPartyIconsEnter = selection.select('.privacy-options-list')
.selectAll('.privacy-third-party-icons-item')
.data([prefs('preferences.privacy.thirdpartyicons') || 'true'])
.enter()
.append('li')
.attr('class', 'privacy-third-party-icons-item')
.append('label')
.call(uiTooltip()
.title(() => t.append('preferences.privacy.third_party_icons.tooltip'))
.placement('bottom')
);
thirdPartyIconsEnter
.append('input')
.attr('type', 'checkbox')
.on('change', (d3_event, d) => {
d3_event.preventDefault();
prefs('preferences.privacy.thirdpartyicons', d === 'true' ? 'false' : 'true');
});
thirdPartyIconsEnter
.append('span')
.call(t.append('preferences.privacy.third_party_icons.description'));
// update
selection.selectAll('.privacy-third-party-icons-item')
.classed('active', d => d === 'true')
.select('input')
.property('checked', d => d === 'true');
// Privacy Policy link
selection.selectAll('.privacy-link')
.data([0])
.enter()
.append('div')
.attr('class', 'privacy-link')
.append('a')
.attr('target', '_blank')
.call(svgIcon('#iD-icon-out-link', 'inline'))
.attr('href', 'https://github.com/openstreetmap/iD/blob/release/PRIVACY.md')
.append('span')
.call(t.append('preferences.privacy.privacy_link'));
}
prefs.onChange('preferences.privacy.thirdpartyicons', section.reRender);
return section;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usability An issue with ease-of-use or design
Projects
None yet
Development

No branches or pull requests

3 participants